L.A.8.1 o IRS

LAB EXERCISE Lesson 8 - irs

 

Background:

 

Federal income tax rates can be calculated using tax rate schedules.  The following are tax rates for two out of the four categories used by the IRS in 1996:

 

Schedule X - Single

 

If your taxable income is:

 

over -                         but not over -                                your tax is                      of the amount

                                                                                                                         over -

 

          $ 0                            $ 24,000                                         15 %                                $ 0

    24,000                               58,150                    $ 3,600.00 + 28 %                          24,000

    58,150                             ---------                  $ 13,162.00 + 31 %                          58,150

 

 

Schedule Y-1 - Married filing jointly

 

If your taxable income is:

 

over -                         but not over -                                your tax is                      of the amount

                                                                                                                         over -

 

          $ 0                            $ 40,100                                         15 %                                $ 0

    40,100                               96,900                    $ 6,015.00 + 28 %                          40,100

    96,900                             ---------                  $ 21,919.00 + 31 %                          96,900

 

 

Assignment:

 

1.    Write a program that:

 

       a.     Prompts the user for the following information:

 

             Filing status : single or married

             Taxable income

 

 

 

       b.    Calculates and prints

 

             Filing status

             Taxable income

             Federal tax

 

2.    Your program should be written using proper modular design and parameter passing.  Use the handout H.A.8.1 as a model.  Your instructor will give you more guidelines if you have questions.

 

3.    Example run output:

 

       Single

       Taxable income = $ 35,125

       Federal tax = $ 6,715.00

 

 

Instructions:

 

1.    Complete the working program to the screen and verify the calculations.  Use the values given above.

 

2.    For Turbo C++ 3.0 users, modify the program to send the run output to disk, and eventually the printer. 

 

       DO NOT send the user prompts to the printer, i.e.,

             cout << "Enter taxable income "; 

 

       Modify only the cout statements that print answers.  This technique was outlined in H.A.1.1, using fstreams.

 

3.    Print your source code first, then the run output below it.

 

4.    Use these values for your run output:

 

             Single, $15,500

 

             Single, $100,000

 

             Married, $50,000

 

             Married, $125,000