CJCoding With Joseph
15per day

Build an Interface-Based Notification System

Create two classes, EmailNotifier and SmsNotifier, that both implement the provided Notifier interface.

Requirements:
- Notifier declares String send(String message).
- EmailNotifier stores a String email from its constructor. send(message) returns "Email to <email>: <message>".
- SmsNotifier stores a String phone from its constructor. send(message) returns "SMS to <phone>: <message>".

Do NOT write a main method.

Expected Output:

Email to a@b.com: Hello
SMS to 555-1234: Hello
Topics:
InterfacesClasses
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.