Develop a top-down design and write a program to determine payroll information for these employees. Function 1: Calculate the pay for each employee by adding up the hours for the week. Calculate each...

1 answer below »
Develop a top-down design and write a program to determine payroll information for these employees. Function 1: Calculate the pay for each employee by adding up the hours for the week. Calculate each employees total pay based on the following scale of hours worked: 0 through 40 hours regular pay More than 40 through 60 hours 1 1/2 pay More than 60 through 80 hours double pay Return the total pay for each employee. Function 2: Determine deductions (state withholding, federal withholding, union dues, and hospitalization) for each employee. Determine the gross pay (before deductions) and net pay (after deductions). Deductions are: Federal Withholding Rate 18% of gross wages State Withholding Rate 4.5% of gross wages Union dues 2% of gross wages Function 3: Output to the file: employee initials, total hours worked, pay rate, the amount of each deduction (Federal withholding, State withholding, and Union dues), gross pay, and net pay. SubFunction 1: Create a subfunction for any of the above functions, for example create a subfunction to determine overtimes. Extra Credit Function: Create a function to read data from file. See sample data below. Validate the data—hours cannot be negative. Output errors with appropriate messages to the screen. Test this module. Hint: use void & pass by reference for getting record all at once. Input 3 employee initials, 7 numbers (representing the hours worked during 7 days), and the employee's hourly rate of pay. Error check data input from the file (by the input module). Create the data file below using your text editor or Notepad. Data File ABC 8.0 8.0 8.0 8.0 8.0 0.0 0.0 8.75 DEF 10.0 10.0 10.0 10.0 10.0 0.0 0.0 9.75 GHI 8.0 10.0 6.0 10.0 9.0 10.0 12.0 10.00 JKL 0.0 0.0 5.0 6.0 7.0 8.0 6.0 8.75 MNO 8.0 8.0 8.0 8.0 8.0 8.0 80.0 8.00 PQR 10.0 10.0 8.0 10.0 6.0 3.0 2.0 9.75 STU 9.0 11.5 5.5 7.5 9.5 -2.5 0.0 11.50 VWX 25.0 0.0 0.0 8.5 7.5 5.5 0.0 12.50 XYZ 10.0 10.0 10.0 10.0 10.0 0.0 0.0 -5.00 AAA 0.0 0.0 0.0 25.0 1.0 0.0 0.0 15.75 Output To an output file: 3 initials , total hours worked, hourly rate of pay, amount of each of 4 deductions (federal withholding, state withholding, union dues), gross pay, net pay. Output valid data to a pay output file. Output errors to an error file. To hand in: The structure chart, the program listing with sufficient comments, and the output.
Answered Same DayNov 10, 2021

Answer To: Develop a top-down design and write a program to determine payroll information for these employees....

Darshan answered on Nov 11 2021
108 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here