โ Back to Classes
Question 201
Build an Interface-Based Notification System
Build an Interface-Based Notification System
Create two classes,EmailNotifierandSmsNotifier, that both implement the providedNotifierinterface. Requirements: -NotifierdeclaresString send(String message). -EmailNotifierstores aString emailfrom its constructor.send(message)returns"Email to <email>: <message>". -SmsNotifierstores aString phonefrom 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.