Reference no: EM13165098
THE JAVA SOURCE CODE
A company hires you to write a program to track hourly employee arrival and departure times from work. In essence, you are tasked to make an online time clock. The time clock shall keep a history of an employee’s hours for a two-week pay period. The application shall have the following functionality:
The ‘report screen’ shall:
(Hint: If you are writing a console application, java.io.PrintWriter may be useful.)
Allow the user to display a work history report for an individual or for all employees for the two weeks prior to the report request.
The screen shall display a prompt to enter ‘I’ for individual employee report, ‘A’ for all employees report.
If the selected value is ‘I’, prompt the user to enter the employee’s ID number.
If ‘I’ is selected the display shall show the employee’s name and ID, list out each day worked in chronological order, the number of hours worked that day and a total number of hours worked in the two week period.
The report shall prompt the user to re-enter an employee ID of it does not exist in the employee file.
Optional Functionality: If the user inputs a nonexistent employee ID more than 3 times, prompt the user and then return to the main screen.
If the selected value is ‘A’, output the information to the console for the past two weeks.
The end of the report shall display “Press any key to continue” to return to the main menu.
Optional Functionality: Allow the user to print the report to a printer.