Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING C++ PLEASE READ ALL An employee is paid at a rate of $16.78 per hour for the first 40 hours worked in a week.

USING C++

PLEASE READ ALL

An employee is paid at a rate of $16.78 per hour for the first 40 hours worked in a week. Any hours over that are paid at the overtime rate of one-and-one-half times that. From the workers gross pay, 6% is withheld for Social Security tax, and 14% is withheld for federal income tax, 5% is withheld for state income tax, and $10 per week is withheld for union dues. If the worker has three or more dependents, then an additional $35 is withheld to cover the extra cost of health insurance beyond what the employee pays. Write a C++ program that will read in the number of hours worked in a week and the number of dependents as input and will then output the workers gross pay, each withholding amount, and the net take-home pay for the week. Test your program with the given test case to make sure it produces the correct results. After showing each workers gross pay, your program should prompt a user whether or not the employee will continue to compute another workers gross pay. If the user enters Y/y, your program should compute and output the gross pay for another worker. If the user enters N/n, your program should stop computing the gross pay for workers

Sample Input and Output: Test Case 1: Input: Enter employee SSN (digits only, no spaces or dashes): 123456 Please the enter hours worked and number of employees: 10 2 Output: Employee number: 123456 Hours worked: 10.00 Regular pay rate: 16.78 Gross pay: 167.80 FICA tax withheld: 10.07 Federal Income Tax withheld: 23.49 State Tax withheld: 8.39 Health Insurance Premium withheld: 35.00 Union Dues withheld: 10.00 Net Pay: 80.85 Enter Y/y to compute pay for another employee? y

Test Case 2: Input: Enter employee SSN (digits only, no spaces or dashes): 987654321 1 CS 3911 C++ in Object Oriented Design: Section 01 Spring 2019 Please the enter hours worked and number of employees: 45 3 Output: Employee number: 987654321 Hours worked: 45.00 Regular pay rate: 16.78 Overtime hours worked: 5.00 Overtime premium: 1.50 Gross pay: 797.05 FICA tax withheld: 47.82 Federal Income Tax withheld: 111.59 State Tax withheld: 39.85 Health Insurance Premium withheld: 35.00 Union Dues withheld: 10.00 Net Pay: 552.79 Enter Y/y to compute pay for another employee? n

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Does it have at least one-inch margins?

Answered: 1 week ago

Question

Does it highlight your accomplishments rather than your duties?

Answered: 1 week ago