practice interactive input, mathematical operations,
Payroll processing
The purpose of this project is to practice interactive input, mathematical operations, loops and formatting output using manipulators (setw(), setprecision(), fixed, showpoint).
Write a C++
Program specifications:
The program should accept employee first name, number of hours worked, the hourly pay rate for each employee and calculate gross pay, federal taxes, social security, and net pay for each employee.
Data validation:
You need to validate data using loops as follow:
Number of hours can NOT be less than 30 hours and can NOT exceed 40 hours.
Hourly pay can NOT be less than $10.25 and can NOT exceed $30.50
Your program should continue to process multiple employees until you enter ‘N’ then program stops, using sentinel loop.
Deductions:
Federal tax rate = .15
Social Security = .17
Note: all deductions should be declared as CONSTANTS
Sample output:
Company Name
Employee Name Hours Worked Pay Rate Gross Pay Net Pay
--------------------- ------------------- ----------- ------------ ----------
John 38 15.50 X X.xx X X.xx
Deductions:
Deduction Type Deduction Rate Deduction Amount
-------------------- -------------------- -------------------------
Federal Taxes .15 X X.xx
Social Security .17 X X.xx
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images