CS 180 Lab 3 Calculating Future Investment Value

Begin by moving into the labs directory in your /Classes/CS180 directory. Next, create a new Here are sample runs of the program: directory named Lab3. Move into the Lab3 directory and create java program named Sample 1: futureInvestments.java. Use VIM to edit your Enter the taxable income: 100000 program following the specifications below. Tax is $21720.0

NOTE: You must finish this assignment during the Sample 2: Enter the taxable income: 10000 allotted lab time to receive credit. You may work Tax is $1082.50 alone, or with others to complete the assignment. The lab assignments should not be electronically Analysis: submitted. Once you are finished, show your (Describe the problem including input and output in your solution to the GTA. own words.) Create a file named problem.txt to use for this section. Problem Description: Design: (Describe the major steps for solving the problem.) The United States federal personal income tax is Create a file named design.txt to use for this section. calculated based on filing status and taxable income. There are four filing statuses: single filers, Code: married filing jointly, married filing separately, and The Java code solution should be placed in head of household. The tax rates vary every year. futureInvestments.java. Table 3.2 shows the rates for single filers in 2009. Testing: Example: (Describe how you test this program) If you are single with a taxable income of $10,000, Create a file named testing.txt to use for this section. the first $8,350 is taxed at 10% and the other $1,650 is taxed at 15%. So, your tax is $1,082.5.

Table 1 2009 U.S. Federal Personal Tax Rates Tax Rate Single 10% $0 – $8,350 15% $8,351– $33,950 25% $33,951 – $82,250 28% $82,251 – $171,550 33% $171,551 – $372,950 35% $372,951+

You are to write a program to compute personal income tax. Your program should prompt the user to enter the taxable income and compute the tax associated with that income. 1