Question: Stage 3: In the third file Mailbox.java, create a class named Mailbox that models a mailbox that contains a list of email messages. Below I

Stage 3: In the third file Mailbox.java, create a class named Mailbox that models a mailbox that contains a list of email messages. Below I have what it should contain.Stage 3: In the third file Mailbox.java, create a class named Mailbox

messages0.txt 
OriginalSender1 OriginalRecipient1 This is my original message1 OriginalSender2 OriginalRecipient2 This is my original message2 
messages1.txt Eric_A_Bially Zachary_B_Howard This_is_test_message_1 Brett_V_Bohorquez Marcus_R_McPartland This_is_test_message_2 Aron_I_Brewster Patrick_C_Nauman This_is_test_message_3 Joshua_J_Dennis Jacob_G_Neff This_is_test_message_4 Stephen_M_Gentzler Kevin_A_Orlowski This_is_test_message_5 Adam_James_D_Geosits Oscar_J_Phillips This_is_test_message_6 Rudolf_C_Gouker Andy_R_Sayer This_is_test_message_7 Zachary_B_Howard Craig_Smith This_is_test_message_8 

Stage 3: In the third file Mailbox.java, create a class named Mailbox that models a mailbox that contains a list of email messages. It should contain the following: Private instance variables messages and numOfMessages Hint: the type for messages should be ArrayList public MailboxC) * public void addMessage (Message m) public Message getMessage(int i) public int getNumberOfMessages ) A default constructor to initialize two instance variables Add a new message into the list messages, and update the numOfMessages Return the z message from the list Return the number of messsages in mailbox public void removeMessage(int i) Remove the ith message from the list public void printAllMessages ) Print out all messages in the mailbox Stage 4: In the fourth file MailboxTester.java, you will need to do the followings: 1. Create an object of Mailbox type

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!