Answered step by step
Verified Expert Solution
Link Copied!
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++
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students explore these related Databases questions