Question: Write a program named Project2 that maintains wage information for the employees of a company. The company maintains a text file of all of the

 Write a program named Project2 that maintains wage information for theemployees of a company. The company maintains a text file of allof the current employees called Employeesln.dat. Each line of the file contains

Write a program named Project2 that maintains wage information for the employees of a company. The company maintains a text file of all of the current employees called Employeesln.dat. Each line of the file contains the employee's name (last name, first name), a character code indicating their wage status (h for hourly or s for salary), and their wage (pay/hour for hourly employees and the annual salary for salary employees). The name, wage status and wage are separated by varying amounts of white space (at minimum, there are two spaces). For example, Harris, Joan h Baird, Joey h Kinsey, Paul h Olson, Margaret s 15000 Campbell, Peter s Draper, Donald s Sterling, Roger s Cooper, Bertram s 50000 5.00 7.50 8.00 20000 40000 45000 Once a week (generally on Friday), updates to the file (Employeesln.dat) are made and the weekly paycheck amount is calculated for each employee based on the hours worked that week. The update information is read from a second text file called Updates.dat. Updates can be any of the following adding a new employee (n), raising the rate of pay for all employees by a given percentage (r), or dismissal of an existing employee (d) For example, the file could contain the following lines Pryce, Lane s 40000 Kinsey After performing the updates, the revised information is written to a text file named EmployeesOut.dat a summary report is displayed on the console in the following format, New Employee added: Pryce, Lane New Wages: Harris, Joan Baird, Joey Olson, Margaret Campbell, Peter $5.25/hour $7.88/hour $15750.00/year $21000.00/year

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