View the step-by-step solution to:

# NetPay4Ecpp Write a program to accept with input and output similar to the following. Input is in red. \$xxx.

NetPay4Ecpp

Write a program to accept with input and output similar to the following. Input is in red. \$xxx.xx will be replace by the calculated values.

input

```     Employee name? name
Hourly Rate? 15.00
Hours worked? 42
```

Output is

```     Rich earned \$645.00
FICA \$xxx.xx
Fed \$xxx.xx
State \$xxx.xx
Net Pay \$xxx.xx
```

Calculations:

FICA is calculated at 7.65%. Fed tax is calculated at 22% for gross pay amounts less than \$1500 and 28% for larger gross pay amounts. State tax is calculated at 12%. Overtime is payed at 1.5 regular rate for any hours over 40.

Required Functions:

You may use as many functions as you wish but you must have functions named as below. You must determine the parameters for these functions and whether they will be value returning or void functions. There are many correct solutions, pick a path and make it work. Include a comment to describe the purpose of each function.

GetPay()

GetHrs()

GetRate()

PrintStub()

CalcFICA()

CalcFedTax()

CalcStateTax()

Special Conditions:

Accept only hourly rates between 5.50 and 200.00. Force the user to reenter an hourly rate until it is in range.

Accept only hours worked between 0.0 and 60.0 without a warning cross check. If hours are greater than 60.0 ask the user to override the 60 hour limit. The user may override the limit and use a value out of range or renter a value. The final value entered must either be within range, or overridden.

Flag any net pay in excess of \$10,000 with the "(out of normal range)" warning.

Comment your code so the next poor person who needs to modify it will thank you.

Use the /* in */ and /* out */ comments to indicate pass by value and pass by reference parameters in the style used by the textbook.

Prototype all function at the beginning of the program. The main() function should be the first actual coded function and all other functions should appear below the main().

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents