Question

In: Computer Science

The United States federal personal income tax is calculated based on filing status and taxable income....

The United States federal personal income tax is calculated based on filing status and taxable income. There are four filing statuses (in this program we’ll use only three): single filers, married filing jointly, and head of household. The tax rates vary every year. Table 1 shows the rates for 2016. If you are, say, single with a taxable income of $10,000, the first $9,075 is taxed at 10% and the other $925 is taxed at 15%. So, your tax is $1,046.25.

 

Table 1. 2014 Taxable Income Brackets and Rates

Rate

Single Filers

Married Joint Filers

Head of Household Filers

10%

$0 to $9,075

$0 to $18,150

$0 to $12,950

15%

$9,076 to $36,900

$18,151 to$73,800

$12,951 to $49,400

25%

$36,901 to $89,350

$73,801 to $148,850

$49,401 to $127,550

28%

$89,351 to $186,350

$148,851 to $226,850

$127,551 to $206,600

33%

$186,351 to $405,100

$226,851 to $405,100

$206,601 to $405,100

35%

$405,101 to 406,750

$405,101 to 457,600

$405,101 to $432,200

39.6%

$406,751+

$457,601+

$432,201+

Source: Internal Revenue Service

Part I:

You are to re-write programming assignment 1 to compute personal income tax. Your program should prompt the user to enter the filing status and taxable income and compute the tax. Enter 0 for single filers, 1 for married filing jointly, and 2 for head of household.

 

Part II:

In this part of the assignment, you will reorganize your code using Methods. Your program must have at least four (4) methods i.e the main method, and the other three (3) for tax brackets that return the tax amount owed. You will organize the income ranges as an Array in each method and select an Array Record to compute specific tax in a tax bracket.

 

 

Part III

 

i) You are required to follow the Software Development Process (Ref: Chapter 2.16).

ii) Must include a Design Diagram [Ref: Fig. 6.11]

iii) Use UML [Ref: Fig 9.4] create class diagrams for your program

NOTE

There will be NO POINTS earned even if your code is working if you

1. don’t use methods

2. don’t use arrays

Hence you will get a 0/50.

 

Deliverables:

 

Note:

· Project name: ProgrammingAssignment_2

· Class name: ProgrammingAssignment_2

Solutions

Expert Solution

if (status == 0) {
// Compute tax for single filers
}
else if (status == 1) {
// Compute tax for married filing jointly
}
else if (status == 2) {
// Compute tax for married filing separately
}
else if (status == 3) {
// Compute tax for head of household
}
else {
// Display wrong status
}For each filing status there are six tax rates. Each rate is applied to a certain amount of taxable
income. For example, of a taxable income of $400,000 for single filers, $8,350 is taxed at
10%, (33,950 - 8,3502) at 15%, (82,250 - 33,950), at 25%(171,550 - 82,250) at 28%, (372,950 - 171,550) at 33%, (400,000 - 372,950)and at 35%.


public class Assignment3TanhaIslam {
12
13     /**
14      * @param args the command line arguments
15      */
16     public static void main(String[] args) {
17 Scanner input = newScanner(System.in);
18 promt
19         int status = input.nextint();
20 PromtIncome
21         int status = input.nextint();
22          
23 // Prompt the user to enter filing status
24 String statusString = JOptionPane.showInputDialog(
25 "Enter the filing status:\n" +
26 "(0-single filer, 1-married jointly,\n" +
27 "2-married separately, 3-head of household)");
28 int status = input.nextInt();
29
30 // Prompt the user to enter taxable income
31 String incomeString = JOptionPane.showInputDialog(
32 "Enter the taxable income:");
33 double income = input.nextDouble();
34
35 // Compute tax
36
37 if(status==0)
38 { // Compute tax for single filers
39 if (income <= 8350)
40 tax = income * 0.10;
41 else if (income <= 33950)
42 tax = 8350 * 0.10 + (income - 8350) * 0.15;
43 else if (income <= 82250)
44 tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (income - 33950) * 0.25;
45 else if (income <= 171550)
46 tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (82250 - 33950) * 0.25 + (income - 82250) * 0.28;
47 else if (income <= 372950)
48 tax = 8350 * 0.10 + (33950 - 8350) * 0.15 +
49 (82250 - 33950) * 0.25 + (171550 - 82250) * 0.28 +
50 (income - 171550) * 0.33;
51 else
52 tax = 8350 * 0.10 + (33950 - 8350) * 0.15 + (82250 - 33950) * 0.25 + (171550 - 82250) * 0.28 + (372950 - 171550) * 0.33 + (income - 372950) * 0.35;
53 }
54 else if(status==1)
55 { // Compute tax for married file jointly
56 // Left as exercise
57 }
58 else if (status == 2)
59 { // Compute tax for married separately
60 // Left as exercise
61 }
62 else if (status==3)
63 { // Compute tax for head of household
64 // Left as exercise
65 }
66 else
67 {
68
69 System.out.println("Error: invalid status");
70
71 }
72
73 // Display the result
74 JOptionPane.showMessageDialog(null, "Tax is " + (int)(tax * 100) / 100.0);
75 }
76 }

Related Solutions

Based on the amounts of taxable income below, compute the federal income tax payable in 2018...
Based on the amounts of taxable income below, compute the federal income tax payable in 2018 on each amount assuming the taxpayers are married filing a joint return. Also, for each amount of taxable income, compute the average tax rate and the marginal tax rate. a. Taxable income of $30,000 b. Taxable income of $100,000 c. Taxable income of $375,000 d. Taxable income of $700,000
Based on the amounts of taxable income​ provided, compute the federal income tax payable in 2017...
Based on the amounts of taxable income​ provided, compute the federal income tax payable in 2017 on each amount assuming the taxpayers are married filing a joint return.​ Also, for each amount of taxable​ income, compute the average tax rate and the marginal tax rate. Taxable income of $50,000. . Taxable income of $125,000. . Taxable income of $380,000. . Taxable income of $510,000
Research and write the history of the United States Federal Income Tax Law.
Research and write the history of the United States Federal Income Tax Law.
Is the current progressive federal income tax used in the United States equitable?
Is the current progressive federal income tax used in the United States equitable?
Problem 1-11 The Tax Formula for Individuals, Filing Status and Tax Computation, Personal and Dependency Exemptions,...
Problem 1-11 The Tax Formula for Individuals, Filing Status and Tax Computation, Personal and Dependency Exemptions, The Standard Deduction (LO 1.3, 1.5, 1.6, 1.7) Frank, age 35, and Joyce, age 34, are married and file a joint income tax return for 2017. Their salaries for the year total $84,600 and they have taxable interest income of $3,900. They have no deductions for adjusted gross income. Their itemized deductions are $12,800. Frank and Joyce do not have any dependents. Table for...
Taxation table Income Tax Standard personal income tax rates Income band Taxable amount Rate K1 to...
Taxation table Income Tax Standard personal income tax rates Income band Taxable amount Rate K1 to K39,600 first K39,600 0% K39,601 to 49,200 next K9,600 25% K49,201 to K74,400 next K25,200 30% Over K74,400 37.5% Income from farming for individuals K1 to K39,600 first K39,600 0% Over K39,600 10% Company Income Tax rates On income from manufacturing and other 35% On income from farming 10% Capital Allowances Implements, plant and machinery and commercial vehicles: Wear and Tear Allowance – Standard...
Based on the federal tax chart, what are the taxes owed in the following situation Taxable...
Based on the federal tax chart, what are the taxes owed in the following situation Taxable income $1,500,000?
Round to two decimal places at each calculation. Find the Taxable income for federal income tax...
Round to two decimal places at each calculation. Find the Taxable income for federal income tax withholding = $ Taxable income for social security tax = $ Taxable income for Medicare tax for a,b,c for this question. 1a. An employee works 42 hours (42-40 were overtime hours) during a workweek in December of 2016. He earns $40.50/hour, with his employer paying 1.5 times the regular rate of pay for overtime hours. To date, he has earned $117,900 during the year....
the impact of changing our current federal tax code to a proportional tax for personal income...
the impact of changing our current federal tax code to a proportional tax for personal income from the current progressive tax we have currently. What you feel would be the impact on tax revenue, labor supply, etc. Explain in detail.
7) Taxpayer's filing status is Head of Household. For the taxable year, Taxpayer reports the following...
7) Taxpayer's filing status is Head of Household. For the taxable year, Taxpayer reports the following items of gross income, claims the standard deductions, reports no For AGI deductions, and is not eligible for a QBID or any tax credits. Determine Taxpayer's income tax liability. Salary of $68,100 Qualified dividends of $11,000 A) $7,803 B) $7,343 C) $6,893 D) $5,693 18)   During the tax year, Taxpayer, who is unmarried, earned $70,000 in ordinary income, a net short-term capital loss of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT