Skip to main content

Practice · 3 of 4

Notifier behind an interface

CHALLENGE
Difficulty: beginner+25 XP

Implement in Solution: interface INotifier { string Send(string message); }; classes EmailNotifier (returns "email: " + message) and SmsNotifier (returns "sms: " + message); and static string Broadcast(INotifier n, string message) returning n.Send(message).

Back to lesson: Practice: OOP workout