Question: 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++
 You are tasked with developing a simple notification system for an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!