Design a class message that models an e-mail message a


Design a class Message that models an e-mail message. A message has a recipient, a sender, and a message text. Support the following member functions:

- A constructor that takes the sender and recipient and sets the time stamp to the current time

- A member function append that appends a line of text to the message body

- A member function to_string that makes the message into one long string like this: "From: Harry Hacker\nTo: Rudolf Reindeer\n ..."

- A member function print that prints the message text.

Write a program that uses this class to make a message and print it.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Design a class message that models an e-mail message a
Reference No:- TGS02533524

Now Priced at $10 (50% Discount)

Recommended (92%)

Rated (4.4/5)