Design a class Message that models an e-mail message. A message has a recipient, a sender, and

Question:

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

• A constructor that takes the sender and recipient
• A method append that appends a line of text to the message body
• A method toString that makes the message into one long string like this: "From:

Harry Morgan%nTo: Rudolf Reindeer%n . . ." Write a program that uses this class to make a message and print it.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: