Wyo Java Ch19Proj5

Write a class named Ch19Proj5 that keeps track of the email messages for five employees numbered 0 to 4. Each email message is simply a string. The program presents the following menu to the user:

1. Change employee number
2. Get new mail
3. Read first message
4. Delete first message
5. Exit
Input menu choice:

Assume that employee #0 is "logged in" when the program begins. When menu choice 2 is selected, a random number of email messages between 0 and 3 is added to the current employee's list of messages. Each email message is a string. (You can set an email message to any word or phrase.) When menu choice 3 is selected, the next message in the current employee's list of email messages is displayed. An employee can only view the first message in his list (i.e. queue) of messages. When menu choice 4 is selected, the first message is deleted (whether the employee previously viewed the message or not.) When menu choice 5 is selected the program ends. When menu choice 1 is selected, the user is prompted to input an employee number between 0 and 4. If the employee has no messages when he selects menu choice 3 or 4, display the message "You have no mail."

You should use a logical, efficient combination of data structures when you write this program.

Your program must follow the class Coding Standards. Save all of the files associated with this assignment to a folder named Ch19Proj5 in the appropriate network folder.

Preconditions:

  • The user will type an integer anywhere one is expected however the integer may not be in the specified range. For example, you must display an error message if the user inputs -1 as a menu choice.

You must hand in the following on separate pages stapled in this specified order:

  1. The source code for the Ch19Proj5 class.
  2. The printscreen of your console window output with each menu operation displayed once or more. Be sure to print black text on white background.