Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming Assignment 2 Note: When you turn in an assignment to be graded in this class, you are making the claim that you neither gave
Programming Assignment 2 Note: When you turn in an assignment to be graded in this class, you are making the claim that you neither gave nor received assistance on the work you turned in (except, of course, assistance from the instructor). 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 25000 Campbell, Peter s Draper, Donald s Sterling, Roger s Cooper, Bertram s90000 15.00 17.50 18.00 30000 60000 75000 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 ( 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 (The output is for formatting purposes only, do not assume it contains accurate numbers or is complete.) New Employee added: Pryce, Lane New Wages: $15.75/hour $17.85/hour Harris, Joan Baird, Joey Olson, Margaret Campbell, Peter $26250.00/yea:r $31500.00/yea:r Deleted Employee: Kinsey, Paul
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started