Create an Employee class. 1) Private class members for: a) an array of 5 integer employee ids b) an array of 5 string last names c) an array of 5 string first names d) an array of 5 double pay rates e) other class variables as needed 2) Public class methods:
a) a method to fill all four employee info parallel arrays by keyboard inputs. b) the fill employee info method will take entries for employee ID, employee first name, employee last name, employee pay that will fill each array. For the employee ID entry, when the ID number is ***** you will check the ID array for a duplicate ID and prompt the user to reenter the employee ID c) a method to search the parallel arrays either by id number, by last name or by hourly pay d) a console menu asking which choice is desired, id, last name, or hourly pay e) use a selection structure to evaluate the option entered and call one of three class methods: search for ID search for last name search for pay default will be to display "Sorry - invalid option" for each of the three search methods called from the search employees method you will: a) prompt the user to enter the ID number, or last name, or pay depending on which method is called b) take the input (ID, last name, pay) for the processing search method and use a loop to find the ID, last name, or pay that was entered for the corresponding search method c) when a match is found display all corresponding (parallel) information for the found employee info d) if the entered id, last name or pay are not found then display "Sorry - no employee with (entered ID, name, or pay) + the value entered 3) In Main: a) Instantiate one new employee object b) call the class method that will fill the employees array c) a sentinel loop with a sentinel variable that will be initialized to character Y and a conditional that will continue while the sentinel is not equal to 'N' or 'n' d) in the loop call the search employees class method e) accept an entry from the keyboard to allow the user to make selections until an n or an N is entered f) when an n or an N is entered terminate the while loop INTERNAL COMMENTS/DOCUMENTATION NEEDED The class will contain the following methods: fillEmployees, searchEmployees, searchID, searchLast, searchPay as specified above. Analyze the suggested inputs and outputs to gain further information about how the processes are run and how incorrect inputs are handled.
10 years ago
Purchase the answer to view it

- qqyeeclass.zip