Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You need to create a class Message that represents an email message. This class,

ID: 3691031 • Letter: Y

Question

You need to create a class Message that represents an email message. This class, for instance, can be used in implementation of a mail server. The class must declare the following attributes: Sender (type String) List of recipients (array of Strings) Timestamp (type String) and methods: void setSender(String S) String getSender() void addRecipient(String S) String[] getRecipients() int getNumOfRecipients() String getTimeStamp() String toString() Message() It is assumed that maximum number of recipients is set to 10 (hint: to be used as size of the array where you store recipients). Also it is assumed that timestamp must be evaluated at the time of object creation (functionality to be implemented in class constructor). Method toString() is expected to return String representation of the Message object

Explanation / Answer

The class:

class message
   {
   Sring sender,recipients[10],timestamp;
   void setSender(String S)
       {
      
       }
      
   String getSender()
       {
      
       }
   void addRecipient(String S)
       {
      
       }
   String[] getRecipients()
       {
          
       }
   int getNumOfRecipients()
       {
      
       }
   String getTimeStamp()
       {
      
       }
   String toString()
       {
          
       }
   Message()
       {
          
       }
   }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote