Question: Program Two You have been asked to write a payroll program for a small company. They have two files. One contains the employee information.

Program Two You have been asked to write a payroll program fora small company. They have two files. One contains the employee information.

Program Two You have been asked to write a payroll program for a small company. They have two files. One contains the employee information. The other contains one week's worth of work hours for the employees. Program operation The program should first open and read all of the employees from the file that lists the employees. The file consists of a single line record for each employee, with each field separated by a comma. This file has the following format: employee id, first name, last name, employee type, salary Sample entries in the file might look like the following. 101-M, Frank, Zappa, H, 22.50 103-J, Mary, McCarthy, E, 32.50 003-K, William, Ramos, C, 32.50 The possibilities for the employee type are H - hourly E - exempt C - contractor The salaries for the employees are per hour. There will also be a second file that holds the hours worked for each employee. This file looks like the following: 11/10/2020, 101-M, 8.0 11/11/2020, 101-M, 8.0 11/10/2020, 103-J, 8.5 11/10/2020, 003-K, 8.0 11/12/2020, 101-M, 10.0 11/13/2020, 101-M, 9.0 Note that neither the dates nor employee ids are in any guaranteed order. The program reads in the hours that each employee worked that week and adds the hours to that employee. Note that you will need to find the employee in the array list based on the employee id. Do not make any assumptions about the order of the data. It may be ordered by date, by employee id, or by some other order...or no order at all. Once the information has been read from the files, output the payroll information and any required statistics. Implementation requirements You will need several classes to fulfill the requirements for this assignment. You will need a PayrollManager class which will contain the main method. It is this class that manages the program. It will create the Payroll class. It will call the methods in the Payroll class to load in the employees and hours worked. Finally, it will pull information from the Payroll class (the list of Employees) and print the required output. Note, ONLY the Payroll Manager should do any output (with the exception of error The following is sample output for the data files included with this assignment: Employee type X not supported Id 999-M not found Payroll ID Last 101-M Jaime 111-M Jon 122-M Jorah 123-M Davos Stark 131-M Sansa 132-M Bran Stark 133-M Samwell Tarly 151-M Catelyn Stark Stark 153-M Arya 172-M Daenerys Targaryen 181-M Cersei Lannister Greyjoy 183-M Theon Total Statistics Date 05/17/20 05/18/20 05/19/20 First Lannister Snow Mormont Seaworth 05/20/20 05/21/20 Total Hours 92.00 Hours Wage 12.50 42.00 17.50 42.00 15.00 42.00 15.00 42.00 32.50 42.00 22.00 42.00 17.50 42.00 22.50 38.00 39.50 42.00 42.00 42.00 32.50 42.00 32.50 42.00 500.00 Pay 2318.00 120.00 3010.00 96.00 2408.00 96.00 2408.00 96.00 2408.00 500.00 12552.00 Pay 537.50 735.00 645.00 645.00 1397.50 924.00 735.00 855.00 1698.50 1764.00 1300.00 1300.00 12536.50

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 Programming Questions!