Question: use c++ Language Program that achieves the following: a) creates a parent class ( Parent class is not a template class) of message with following
use c++ Language
Program that achieves the following:
a) creates a parent class ( Parent class is not a template class) of message with following member
variables and getter setter functions
i) message id
ii) from
iii) to
b) Implement a template class( Child class must be template class ) that inherits from this abstract
class, child classes would be
i) textMessageClass
textMessageClass will have "Text"member variable.
ii) mediaMessageClass
mediaMessageClass will have "attachment"member variable
In the template class, define a static function that always returns
the current time which would be used to store in message body
to keep the context of when message was sent.
Write a program that achieves the following: a) croates a parent class of messago with following momber variables and getter setter functions i) message id ii) from iii) to b) Implement a template class that inherits from this abstract class, child classes would be I) textMessageClass textMessageClass will have "text"member variable. ii) mediaMessageClass mediaMessageClass will have "attachment" member variable In the template class, define a static function that alvays retums the current time which would be used to store in message body to keep the context of when message was sent.
Step by Step Solution
3.44 Rating (157 Votes )
There are 3 Steps involved in it
Certainly Lets implement this in C Step 1 Create the Parent Class Message cpp include include include class Message protected int messageId stdstring ... View full answer
Get step-by-step solutions from verified subject matter experts
