Tax Bracket
Description
This program will compute a basic, estimated 2019 tax for a given
single filer’s income.
Requirements
• Use the following Main method. Copy/paste into your code.
public static void Main(string[] args)
{
// Retrieve the income and display the tax
Console.WriteLine("2019 income tax: {0:C}",
ComputeTax(GetIncome()));
} // end Main
• Create a method named GetIncome (either static or non-static) in
the same class as Main.
o This method will prompt for, retrieve, and return the 2017 income
(as a decimal) entered by the user.
o It has no formal parameters.
o Include external method header documentation: Follow the pattern
presented in some of the note’s examples as well as in the
annotated style guide shown online. (You will only need to write a
brief description and complete the @return description for this
method.)
o Internal comments are not required in this method.
• Create a method named ComputeTax (either static or non-static) in
the same class as Main.
o This method will return the income tax for a single filer’s
income.
o It has one formal parameter that will take a decimal value
representing the single filer’s taxable income.
o Here is the algorithm that will compute the tax:
▪ 10% on taxable income from $0 through $9,700, plus
▪ 12% on taxable income over $9,700 through $39,475, plus
▪ 22% on taxable income over $39,475 through $84,200, plus
▪ 24% on taxable income over $84,200 through $160,725, plus
▪ 32% on taxable income over $160,725 through $204,100, plus
▪ 35% on taxable income over $204,100 through $510,300, plus
▪ 37% on taxable income over $510,300.
For example, if your taxable income were $48250, your tax would
be
($48250 - $39475) * .22 + ($39475 – $9700) * .12 + $9700 * .1 =
$6473.50
o You are not required to create named constants for any numbers.
You may just “hard-code” them in. However, recall the first step we
learned for binary promotion in arithmetic expressions:
If either operand is of type decimal, the other operand is
converted to type decimal, or a binding-time error occurs if the
other operand is of type float or double.
To get around this error you will likely need to explicitly cast
numeric literals with a decimal point to a decimal or attach the
letter M on the right side of the number.
o Include external method header documentation: Follow the pattern
presented in some of the note’s examples as well as in the
annotated style guide shown online. The assumption (precondition)
to also include is that the income sent to this method is >=
0.
o Internal comments are not required in this method.
• Follow all coding guidelines (including class header comments)
and remember to insert comments as discussed.
• Match the input prompt shown in the sample runs on the next
page.
Sample Runs
Tax Bracket CS201
User input shown in red User input shown in red
Enter 2019 income: $8000.67
2019 income tax: $800.07
Enter 2019 income: $39475
2019 income tax: $4,543.00 User input shown in red User input shown
in red
Enter 2019 income: $39476
2019 income tax: $4,543.22
Enter 2019 income: $95400
2019 income tax: $17,070.50 User input shown in red User input
shown in red
Enter 2019 income: $190000
2019 income tax: $42,116.50
Enter 2019 income: $356789
2019 income tax: $100,069.65 User input shown in red
Enter 2019 income: $512500
2019 income tax: $154,612.50



import java.util.*;
import java.math.RoundingMode;
import java.text.DecimalFormat;
class A{
private static DecimalFormat df = new
DecimalFormat("0.00");
static double GetIncome(){
Scanner sc = new
Scanner(System.in);
System.out.print("Enter 2019
income: $");
double n = sc.nextDouble();
return n;
}
static void ComputeTax(double n){
System.out.print("2019 income tax:
$");
double tax=0;
if(n>=0 &&
n<=9700){
tax = tax + (n *
.1);
}
else if(n>9700 &&
n<=39475){
tax+=9700*.1;
n-=9700;
tax+=n*.12;
}
else if(n>39475 &&
n<=84200){
tax+=
(n-39475)*.22;
tax+=(39475-9700)*.12;
tax+=9700*.1;
}
else if(n>84200 &&
n<=160725){
tax+=(n-84200)*.24;
tax+=(84200-39475)*.22;
tax+=(39475-9700)*.12;
tax+=9700*.1;
}
else if(n>160725 &&
n<=204100){
tax+=(n-160725)*.32;
tax+=(160725-84200)*.24;
tax+=(84200-39475)*.22;
tax+=(39475-9700)*.12;
tax+=9700*.1;
}
else if(n>204100 &&
n<=510300){
tax+=(n-204100)*.35;
tax+=(204100-160725)*.32;
tax+=(160725-84200)*.24;
tax+=(84200-39475)*.22;
tax+=(39475-9700)*.12;
tax+=9700*.1;
}
else{
tax+=(n-510300)*.37;
tax+=(510300-204100)*.35;
tax+=(204100-160725)*.32;
tax+=(160725-84200)*.24;
tax+=(84200-39475)*.22;
tax+=(39475-9700)*.12;
tax+=9700*.1;
}
System.out.println(df.format(tax));
}
public static void main(String[] args) {
ComputeTax(GetIncome());
}
}
Tax Bracket Description This program will compute a basic, estimated 2019 tax for a given single...
Write a Python program that computes the income tax for an individual. The program should ask the user to enter the total taxable income for the year. The program then uses the tax bracket (as shown below) to calculate the tax amount. This is based on a progressive income tax system which is how income tax is calculated in the U.S. As a result, this for example means that only income above $500,001 is taxed at 37%. Income of lower...
2019 Tax Rate Schedules Individuals Schedule X-Single If taxable income is over: But not over: The tax is: 5 0 9.700 10% of taxable income $ 9.700 S 39,475 5970 plus 12% of the excess 59,700 $ 39,475 IS 84200 54,343 plus 22 of the ces $39.473 $ 84,200 $160,725 $14.382.50 plus 24 of the Rosa $84.200 S160725 S204.100 532 748 50 plus 32% of the cere over $160,735 $104 100 S510 300 546 678 50 plus 39 of the...
2019 Tax Rate Schedules Individuals Schedule X-Single If taxable income is over: But not over: The tax is: $ 0 $ 9,700 10% of taxable income $ 9,700 $ 39,475 $970 plus 12% of the excess over $9,700 $ 39,475 $ 84,200 $4,543 plus 22% of the excess over $39,475 $ 84,200 $160,725 $14,382.50 plus 24% of the excess over $84,200 $160,725 $204,100 $32,748.50 plus 32% of the excess over $160,725 $204,100 $510,300 $46,628.50 plus 35% of the excess over...
2019 Tax Rate Schedules Individuals Schedule X-Single If taxable income is over: But not over: The tax is: 5 0 9.700 10% of taxable income $ 9.700 S 39,475 5970 plus 12% of the excess 59,700 $ 39,475 IS 84200 54,343 plus 22 of the ces $39.473 $ 84,200 $160,725 $14.382.50 plus 24 of the Rosa $84.200 S160725 S204.100 532 748 50 plus 32% of the cere over $160,735 $104 100 S510 300 546 678 50 plus 39 of the...
Lacy is a single taxpayer. In 2019, her taxable income is
$40,000. What is her tax liability in each of the following
alternative situations? Use Tax Rate Schedule, Dividends and
Capital Gains Tax Rates for reference. (Do not round
intermediate calculations. Round your answer to 2 decimal
places.)
a. All of her income is salary from her
employer.
Tax liability = ?
b. Her $40,000 of taxable income includes
$1,000 of qualified dividends.
Tax liability = ?
c. Her $40,000...
2019 Tax Rate Schedules
Individuals
Schedule X-Single
If taxable income is
over:
But not over:
The tax is:
$ 0
$ 9,700
10% of taxable income
$ 9,700
$ 39,475
$970 plus 12% of the excess over $9,700
$ 39,475
$ 84,200
$4,543 plus 22% of the excess over $39,475
$ 84,200
$160,725
$14,382.50 plus 24% of the excess over $84,200
$160,725
$204,100
$32,748.50 plus 32% of the excess over $160,725
$204,100
$510,300
$46,628.50 plus 35% of...
2019 Tax Rate Schedules
Individuals
Schedule X-Single
If taxable income is
over:
But not over:
The tax is:
$ 0
$ 9,700
10% of taxable income
$ 9,700
$ 39,475
$970 plus 12% of the excess over $9,700
$ 39,475
$ 84,200
$4,543 plus 22% of the excess over $39,475
$ 84,200
$160,725
$14,382.50 plus 24% of the excess over $84,200
$160,725
$204,100
$32,748.50 plus 32% of the excess over $160,725
$204,100
$510,300
$46,628.50 plus 35% of...
Compute the income tax due on taxable income entered by the user, given the data as shown in the following table. Be sure to include error checking to make sure the user does not enter a negative number. Assume all entries are integer values. Taxable Income Tax Due From To $49,999 $0 +5% of amount over $0 $0 $50,000 $99,999 $2,500 7% of amount over $50,000 $100,000 $6,000 9% of amount over $100,000 +
2019 Tax Rate Schedules Individuals Schedule X-Single If taxable income is over: But not over: The tax is: $ 0 $ 9,700 10% of taxable income $ 9,700 $ 39,475 S970 plus 12% of the excess over $9,700 $ 39,475 $ 84,200 $4,543 plus 22% of the excess over $39,475 $ 84,200 $160,725 S14,382.50 plus 24% of the excess over $84,200 $160,725 $204,100 $32,748.50 plus 32% of the excess over $160,725 $204,100 $510,300 $46,628.50 plus 35% of the excess over...
2019 Tax Rate Schedules
Individuals
Schedule X-Single
If taxable income is
over:
But not over:
The tax is:
$ 0
$ 9,700
10% of taxable income
$ 9,700
$ 39,475
$970 plus 12% of the excess over $9,700
$ 39,475
$ 84,200
$4,543 plus 22% of the excess over $39,475
$ 84,200
$160,725
$14,382.50 plus 24% of the excess over $84,200
$160,725
$204,100
$32,748.50 plus 32% of the excess over $160,725
$204,100
$510,300
$46,628.50 plus 35% of...