This assessment item is designed to test your understanding of arrays/arrayLists, objects, classes, sorting and searching.
Assessment task This assignment requires you to develop a java program for such a scenario that the manager of a fast food store wants to use it for calculating weekly wage for N employees. N should be declared as a constant and set N=5 or N=7 for the purpose of test. The program requires displaying, sorting and searching the stored data such as employee name, and the worked hours with corresponding wages as shown in figures on the next few pages.
Like assignment 1, the hourly pay rate depends on the skill level of an employee as below:
Skill level Hourly rate 1 $15 2 $17 3 $21 The calculation scheme of wage for each employee is the same as in assignment 1. But the program requires validation for the input data – employee name and worked hours. A valid name is assumed only to contain English letters, a space between first name and surname, and the length is not exceeding 25 letters. An example of an invalid input of employee name can be found in the Figure 8 on page 6. The valid value of weekly worked hours must be at the range between 0 and 60. An error message should be displayed and re-entering data is required, if the user enters the worked hours outside this range. The data of employee names, worked hours and the calculated wages (unsorted) are required to store in three arrays (The sample data in Figure 2 on next page contain 5 records. You can enter these sample data to test your program functionality). You must use parallel arrays or ArrayLists in this assignment to store these data. Your application should display and execute a menu with the following options. A switch statement must be used to execute the following menu options. Note: if the user has not entered the employee data and one of options between 2 and 7 is selected, an error message should be displayed and the program returns to the main menu.