Question: Problem 4. (20 pts total) A Mailboxc is an object where E-Mail messages are following class interface: stored. Consider the class Mailbox public: MailboxO; //

 Problem 4. (20 pts total) A Mailboxc is an object where

Problem 4. (20 pts total) A Mailboxc is an object where E-Mail messages are following class interface: stored. Consider the class Mailbox public: MailboxO; // creates an empty mailbox void addnessage (EMail nemessage); // adds nevmessage to the vector messages vectorEMail> getmessage (string sender); // returns messages from sender private: vector messages; J; Using the class EMail from Problem 3, provide solutions to the following: (a) Implement the addmessage function which adds a new EMail message (newmessage) to the vector messages (b) Implement the member function getmessage which returns a vector of EMail of all the messages in the vector messages that were sent from the sender passed as the parameter. (The function should go through the vector messages and every time it finds a message from the sender, it should add the message to the vector which will be returned.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!