Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop a top-down design and write a program utilizing at least three functions to calculate payroll information and to print out a pay report for
Develop a top-down design and write a program utilizing at least three functions to calculate payroll information
and to print out a pay report for all employee based on Employers Tax Guide (tables 1 and 2). Note: A
withholding allowance is sometimes referred to as an exemption. The program should read the data from an
input file, output records with error to an error file along with appropriate error message, and results to an output
file. Input Validation is required. The pay should be calculated as follows:
Gross Amount: hourly wage X hours worked for the first 40 hours. Any hours above 40 are paid at 1.5 of
the regular hourly rate. An example: hours=45 and rate =$10. Current earnings =40 x 10 + (5 x 1.5 x 10)
FICA Tax: 5.65 % of the gross amount
Federal Income Tax Withheld: subtract $73.08 from the current earnings for each withholding exemption
to get Adjusted Weekly income and use Table 1 or Table 2, depending on marital status.
Net Amount: [Gross Amount] - [FICA taxes] - [Federal Income Tax Withheld]
Table 1 Federal Income tax Withheld for a Single person paid weekly
Adjusted Weekly Income
$0 to $721
Over $721 to$7,510
Over $7,510
Income Tax Withheld
$0
$93.60 +28% of amount over $721
$2,167.16 +35% of amount over $7,510
Table 2 Federal Income tax Withheld for a Married Person paid weekly
Adjusted Weekly
$0 to $1515
Over $1515 to$7,624
Over $7,624
Income Income Tax Withheld
$0
$187.15 +15% of amount over $1515
$2,020.42 + 30% of amount over $7,624
Employee name, hourly wage, hours worked, number of exemptions, and marital status.
Al Clark 38 45.5 4 M
Joyce Itin 120 77 3 M
Vahid Hamidi 15 25 3 M
Melody Jung 27 60.6 1 M
Joahn Garcia -25 -3 -3 M
Vera Moroz 23 72 3 N
Robert Innes 19.85 40 1 S
Mark Armstrong -25 23 5 M
Ashton Williams 15 15.69 -6 S
Angela Klein 0 54.32 6 S
Jerry Smith 168.5 36.5 2 S
Leslie McHenry 68 95.63 1 S
Morgan Stock 72 99 2 S
Nick Lee 15 5 1 S
Mary Jones 45 75.36 2 S
Output
To an output file: employee name and ID, hours worked, hourly rate of pay, amount of each deduction, gross and
net amounts. Output valid data to an output file. Output errors to an error file.
BE SURE TO INCLUDE ADEQUATE ERROR CHECKING IN YOUR PROGRAM AND ERROR DATA WHEN YOU RUN THE
PROGRAM TO DEMONSTRATE
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