Question: Write a C+program to calculate a person's pay stub assuming paid on a monthly basis Your design must be according to the structure chart given

 Write a C+program to calculate a person's pay stub assuming paidon a monthly basis Your design must be according to the structurechart given here. That is main) will call input function, calculation function,and output function in that order. main() Input all data Handles all

Write a C+program to calculate a person's pay stub assuming paid on a monthly basis Your design must be according to the structure chart given here. That is main) will call input function, calculation function, and output function in that order. main() Input all data Handles all calculations Output Computes federal tax and FICA INPUT Input the employee's name, hourly wage, hours worked, withholding allowances, marital status as 'M' or 'S', and previous year-to-date earnings. All input is to be carried out in the input function CALCULATIONS There is one main calculation function which calls another function that will compute the FICA tax and the federal income tax Current earnings are computed as hourly wage times hours worked (extra credit if your program pays time-and-a-half after 40 hours) Year-to-date earnings need to be updated by adding in current earnings. . To compute FICA, if year-to-date earnings are less than $132,900, multiply current earnings by 6.2%; if year-to-date earnings greater than or equal to 132.900 there is no FICA tax i.e. 0.00 To compute federal income tax to be withheld, first subtract the product of the withholding allowances times 80.60 from current earnings and compute tax according to chart below: Amount of check-current earnings-FICA tax-income tax withheld OUTPUT Name of employee, current earnings, year-to-date earnings, FICA tax, income tax withheld, and amount of check. Descriptions are left justified and values are output with two digits to the right of the decimal point and decimal points are lined up. THEME ISSUES Functions, sub-functions, pass by reference Absolutely no global variables permitted TEST DATA Name Hourly Wage Hours Worked 38 35 50 Withholding Marital Allowances Status Al Clark Karen Chen 44.00 Nathan Chan 25.50 Year-to-date Earnings 88,600.00 68,200.00 36,295.50 48.50 3 SAMPLE OUTPUT Al Clark Current Earnings Year-to-date FICA tax Income Tax Withheld Amount of check 1843.00 90443.00 114.27 167.12 1561.62 CHECKPOINTS 1) Include name, e-mail, and lab# as comments in the code and also include code to output this information to the output. 2) Minimum of three (3) comments (including Pre/Post) in each function of the exactly 4 functions other than main) (see structure chart). A fifth signature function is optional, but no more. Pre comments must identify reference variables, i.e. "reference to hourly wages". All functions (other than main) & your signature function) must use prototype style. 3) Use exactly one function separate from main for input. 4) Call a calculation function from main which handles all calculations. This function needs to call a sub-function (another function) to calculate exactly the following and no more: amount of FICA tax and amount of federal income tax withheld. 5) Use exactly one function separate from main for output. Output must be formatted exactly as shown on lab write-up with decimal points lined up. 6) Pass by reference variable is used when needed and only when needed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a C program to calculate a persons pay stub Below is the code that follows the structure chart and instructions given cpp include include includ... View full answer

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!