Goals: The purpose of this assignment is to test students on

Added on - 22 Sep 2019

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 1 of 3 pages
Goals:The purpose of this assignment is to test students on concepts related to interactive I/O, variables,C++ binary arithmetic operators, and output manipulators, string input, and making decisions in C++.Below is the programming task.An employee is paid at a rate of $17.25 per hour for up to 40 regular hours worked in a week. If theemployee works more than 40 hours, it is considered overtime. Any hours over 40 hours but less than orequal to 60 are paid at the overtime rate ($12.34 per hour). Any hours over 60 hours but less than equal to80 hours are paid at the overtime rate ($14.34 per hour). Any hours over 80 hours are paid at the overtimerate ($16.00 per hour).From the worker’s gross pay, 14% is withheld for federal income tax, 5% is withheld for state income tax.$80 is withheld to cover the insurance of the worker and 2 dependents. If the worker has more than 2dependents, then an additional $25 is withheld per dependent for insurance. Write a program that will readin the name of the employee (use getline), number of hours worked in a week and the number ofdependents as input. The program should then output the worker’s name, number of dependents, gross pay,each withholding amount, and the net take-home pay for the week.Note the money amount displayed should be in fixed point, show point and exactly 2 significant digits afterthe decimal point.Note that the ONLY INPUTS the user provides are-The employee’s name.-The number of hours worked in the week.-The number of dependents.Below are four Sample I/ONet Paycheck CalculatorEmployee's Name:John SmithNumber of Hours Worked in a Week:43Number of Employee's Dependents:3---------------------------------------------------------------------Employee's name :John SmithNumber of Dependents :3Hours worked :43Overtime hours :3Gross Income :$727.02State Tax Withheld @ 5% :$36.35Federal Tax Withheld @ 14% :$101.78Worker and 2 Dependents' Insurance :$80.00
Desklib Logo
You are reading a preview
Upload your documents to download or

Become a Desklib member to get access