(Latest Revision: 03/07/2001)
SECOND CS 1500 SOLO PROGRAM: Figuring California
State Income Tax
Your assignment is to write a program that computes (old 1999) California
State Income Tax.
INPUT: The program must prompt first for filing status.
The user will enter X, Y, or Z in response to this prompt. Next
the program must prompt for the taxable income. The user will
input a non-negative integer taxable income.
OUTPUT: The program will compute the California Income
Tax on the taxable income, using Schedule X, Y, or Z according
to which letter the user has input. The program will then
report the tax, as an integer. (It is permissable if the
reported value is incorrect by up to one dollar more or less
than the true amount.) Give some thought to how the output
should look and give it a clear, easy-to-understand
format.
Have a look at
the sample script
to see how it should look when
you run the program. Make sure to write the program so that it
inputs only the filing status and taxable income. If I
decide I want to test all the programs I will want to use
redirection from prepared files of input. This requires that
you and I have a precise agreement on the form of the input.
BELOW you will find the information on the tax schedules for
the fiscal year 1999. (I have made a conscientious effort to
reproduce the tables without error, but this is not an
official copy.
Schedule X - Use if your filing status is
Single or Married Filing Separate
of the
But not the tax amount
over - over - is over -
$ 0 $ 5,264 $ 0.00 + 1.0% $ 0
$ 5,264 $12,477 $ 52.64 + 2.0% $ 5,264
$12,477 $19,692 $ 196.90 + 4.0% $12,477
$19,692 $27,337 $ 485.50 + 6.0% $19,692
$27,337 $34,548 $ 944.20 + 8.0% $27,337
$34,548 AND OVER $1,521.08 + 9.3% $34,548
Schedule Y -
Use if your filing status is
Married Filing Joint or Qualifying
Widow(er) with Dependent Child
of the
But not the tax amount
over - over - is over -
$ 0 $10,528 $ 0.00 + 1.0% $ 0
$10,528 $24,954 $ 105.28 + 2.0% $10,528
$24,954 $39,384 $ 393.80 + 4.0% $24,954
$39,384 $54,674 $ 971.00 + 6.0% $39,384
$54,674 $69,096 $1,888.40 + 8.0% $54,674
$69,096 AND OVER $3,042.16 + 9.3% $69,096
Schedule Z -
Use if your filing status is
Head of Household
of the
But not the tax amount
over - over - is over -
$ 0 $10,531 $ 0.00 + 1.0% $ 0
$10,531 $24,955 $ 105.31 + 2.0% $10,531
$24,955 $32,168 $ 393.79 + 4.0% $24,955
$32,168 $39,812 $ 682.31 + 6.0% $32,168
$39,812 $47,025 $1,140.95 + 8.0% $39,812
$47,025 AND OVER $1,717.99 + 9.3% $47,025
Before midnight on the due date, e-mail the following two items
to me:
- A copy of the source code, properly documented.
- A filtered script showing a test run.
My e-mail address is:
john@ishi.csustan.edu
Please use the following subject lines exactly
for the e-mails:
For the source file: CS1500Solo2source
and for the script file: CS1500Solo2script.
Note that there are no spaces in these subject lines. If you
like, you can copy and paste the subject lines right from this
document.
Thanks! Your use of these subject lines will
really be a big help to me when I try to sort through the
perhaps hundred e-mail messages that will be in my electronic
mailbox!
WHEN IS THIS ASSIGNMENT DUE?
Look for the due date in
the class schedule.
(It's at the top level of the class directory.)