Lab 3 - Show me the money!!

 

You have just been hired as payroll clerk for BIG Incorporated. You have decided to write a computer program to help calculate the pay for a given employee. Each employee has the following deductions taken from his/her paycheck:

 

Federal Income Tax: 15%

State Tax: 3.5%

Social Security Tax: 5.75%

Medicare/Medicaid Tax: 2.75%

Health Insurance: $75.00

 

If the person decides to contribute to a 401K then 5% is deducted for pension.

 

        Have your program prompt the user for his/her gross wages and his/her name.

        Prompt the user as to whether or not they wish to contribute to a 401 K

        The program will then produce output displaying the dollar amount for the above deductions and the net pay.

        Run your program on three sets of input.

        For your output:

o   all money values are printed to two decimal places.

o   the first column is left justified and 30 spaces wide

o   the second column is right justified and 10 spaces wide

 

 

Click Here for grading Rubric. Make sure your code satisfies all categories in the rubric. Print the rubric and staple to the front of your lab. Fill in your name in the appropriate place.

 

Sample Output

Please enter the gross salary amount: 3575

Please enter your name: Barack Obama

Do you wish to contribute to a 401K? Answer y for yes and n for n no: y

 

 

Barack Obama

----------------------------------------------------

Gross Amount:

3575.00

Federal Tax:

536.25

State Tax:

125.13

Social Security Tax:

205.56

Medicare/Medicaid Tax:

98.31

401 K Pension Plan:

178.75

Health Insurance:

75.00

Net Pay:

2356.00

 

 

Sample Output II

Please enter the gross salary amount: 400

Please enter your name: Susan Imberman

Do you wish to contribute to a 401K? Answer y for yes and n for n no: n

 

 

Barack Obama

----------------------------------------------------

Gross Amount:

4000.00

Federal Tax:

60.00

State Tax:

140.00

Social Security Tax:

230.00

Medicare/Medicaid Tax:

110.00

401 K Pension Plan:

0.00

Health Insurance:

75.00

Net Pay:

3385.00