logMessage($message);
}
}
// Creating instances and testing the functionality
$morningUser = new User();
echo $morningUser->userMessage(‘Good Morning’); // Output : Good Morning
$morningUser->sendNotification(‘User1’, ‘You have a new message’);
// Output : Notification sent to User1: You have a new message
$noonUser = new User();
echo $noonUser->userMessage(‘Good Noon’); // Output: Good Noon
$noonUser->sendNotification(‘User2’, ‘Your order has been shipped’);
// Output: Notification sent to User2: Your order has been shipped
?>