Assignment #3: Working with Decision Structures

advertisement
CIS 221 Assignment #3
Decisions
Due Sunday 10/10/2010
Turn in a zip file containing both projects to Blackboard’s Digital Dropbox
In this assignment you will write two VB .NET project. One is a tax calculation, and the other is a restaurant menu.
These are described below. In both cases you are using nested decision control statements. Professional format is
necessary. Make sure to thoroughly test your programs. Also, remember to comment your code, give descriptive
names for your controls and variables, and use proper indentation. Reminders: good programming techniques are
required, name your folder with your EID.
Objectives: Decisions, Select Case Statement, If Statements, Currency format, Radio Buttons, Check Boxes, Group
Boxes
Part 1
If you have not already had a paying job, when you get your first paycheck, you will notice various taxes are
deducted. Those required include social security and federal income tax and may include state taxes (Virginia, Maryland
& DC have state taxes, however, Florida, Texas, and Nevada do not have state income taxes). Federal income taxes rates
are different for single, married, head of household or married filing separately. The money withheld each pay period is
an estimate of what you will owe for the year. At the end of the year, you will receive a W-2 that is used to file your
taxes with the IRS. This together with other income and deduction will be used to calculate the exact amount of taxes
you will the IRS. For this assignment, we are simplifying the process to allow the user to enter the dollar amount that
will be taxed and the program should return the tax.
Create a program that calculates the 2010 federal income taxes for either a single filer or a married filer.
Single Filing Status
[Tax Rate Schedule X, Internal Revenue Code section 1(c)]
* 10% on income between $0 and $8,375
* 15% on the income between $8,375 and $34,000; plus $837.50
* 25% on the income between $34,000 and $82,400; plus $4,681.25
* 28% on the income between $82,400 and $171,850; plus $16,781.25
* 33% on the income between $171,850 and $373,650; plus $41,827.25
* 35% on the income over $373,650; plus $108,421.25
Married Filing Jointly or Qualifying Widow(er) Filing Status
[Tax Rate Schedule Y-1, Internal Revenue Code section 1(a)]
* 10% on the income between $0 and $16,750
* 15% on the income between $16,750 and $68,000; plus $1,675
* 25% on the income between $68,000 and $137,300; plus $9,362.50
* 28% on the income between $137,300 and $209,250; plus $26,687.50
* 33% on the income between $209,250 and $373,650; plus $46,833.50
* 35% on the income over $373,650; plus $101,085.50
For this program, you MUST use both an IF statement and a SELECT CASE statement (suggestions, use the If statement to
determine if the user is married or single and a Case statement to determine the tax).
Part 2
Do problem #6 on page 156 or your textbook (restaurant menu).
Download