Assignment (1) - CS1440
Due Jan. 29

This assignment is the same as the Post-lab for Lab (2).  You need to submit part of the assignment electronically and another part in class.  Here is what you need to do:

Part 1 (20 points): Part one of your homework is to write (in pen or printout) a description of whether each tax curve is "fair", and if not, why not. Be specific: discuss the incentives or disincentives to earning in each curve, and whether rich and poor taxpayers are treated appropriately. (For example, some consider the gas tax regressive, in that the rich pay a smaller percentage of their income for the privilege of driving.)  Please note that in order to be able to answer this question, you need to first understand and explain the behavior that you are seeing on each graph.

Part 2 (60 points): Part two of your homework is to write a program which asks the user for his income, then prints the associated tax according to the following table:
  If income is                                                      then tax is
  less than $10,000                                               5% of income
  at least $10,000, but less than $15,000               $500 + 6% of amt over $10,000
  at least $15,000, but less than $20,000               $800 + 7% of amt over $15,000
  at least $20,000                                                 $1,150 + 8% of amt over $20,000

Your program should be formally documented as described in Part  2-3 of Lab (2).  Note that documentation includes:
  Have the correct header
  Meaningful variable declaration
You will turn in a printout of the program before Lab (3) begins..

Part 3 (10 points): Part three of your homework is to run your program several times to fill in this table:
  Income                   Tax

Then draw a well-labeled graph of income vs. tax including these data points. (You
may want to add more data points if you have doubts about the shape of your curve.)  Note that you can use the graphing paper to plot your data or use Microsoft Excel or other spread sheets to do so.

Part 4 (10 points): The last part of your assignment is to evaluate the fairness of your tax curve based on the shape you ended up with.

What to submit electronically:
Once you are done with your program and ran it for the data required by Part (3), you need to follow these steps to create a typescript file to submit.
% script   (This starts the script)
% more YourProgram.C  (replace the YourProgram with the name of your program)
% g++ YourProgram.C  (Compile the program, must compile without errors)
% a.out   (run the program and show the result for one input)


Now you have a typescript file.  Type % more typescript to make that file is created and is not empty.  Then execute the following command to submit your file.
~rt/bin/submit1440_102   assgn1   typescript

You can check to make sure that your file was submitted correctly:
~rt/bin/submit1440_102   assgn1

Hardcopy to submit in class:
A) Discussions in Part (1)
B) Copy of your program
C) Completed table in Part (3)
D) Graph of data in Part (3) and discussion of the fairness of the graph.

I would use your grade on the Assignment and multiply it by 0.30 to compute your grade for the Post-lab.