Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are tasked with developing a simple notification system for an application using inheritance and polymorphism. The system should be able to handle different types
You are tasked with developing a simple notification system for an application using
inheritance and polymorphism. The system should be able to handle different types of
notifications and send them through various channels.
Instructions:
Base Class: Notification
Create a base class named Notification.
Add a protected member variable message of type string to store the
notification message.
Add a public constructor that initializes the message variable.
Add a pure virtual function send that returns void.
Derived Classes: EmailNotification and SMSNotification
Create two classes EmailNotification and SMSNotification that publicly
inherit from Notification.
In the EmailNotification class, implement the send function to print
"Sending email:
SOLVE THIS IN C
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started