Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago