Question: Write a JAVA program to do the following: The program allows the user to input some of the information that normally appears on a tax
Write a JAVA program to do the following: The program allows the user to input some of the information that normally appears on a tax form, then it calculates a tax bill according to the formulas described below.
Instructions: For this assignment, you must follow directions exactly:
1. Ask the user for the number of exemptions. The number of exemptions is an integer.
2. Ask the user for their gross salary. The gross salary represents dollars, which can be entered with or
without decimal points.
3. Ask the user for their interest income. The interest income represents dollars, which can be entered withor without decimal points.
4. Ask the user for their capital gains income. The capital gains represents dollars, which can be enteredwith or without decimal points.
5. Ask the user for the amount of charitable contributions. The charitable contributions represents dollars,which can be entered with or without decimal points.
6. Write a method to perform the calculation of total income, as shown in the Formula section.
7. Write a method to perform the calculation of the adjusted income, as shown in the Formula section.
8. Write a method to perform the calculation of the total tax, as shown in the Formula section.
9. Print out the total income, adjusted gross income, and total tax.
The example below shows five lines of user input followed by three lines of program output:
Number of Exemptions: 3
Gross Salary: 67234.45
Interest Income: 2145.32
Capital Gains: 523.01
Charitable Contributions: 872.45
Total Income: $69902.78
Adjusted Income: $64530.33
Total Tax: $11508.49
Formulas: Total Income = Gross Salary + Interest Income + Capital Gains
Adjusted Income = Total Income - (Number of Exemptions * 1500.00) - Charitable Contributions
Total Tax computation: 0% on Adjusted Income above $0 and below $10,000 +
15% on Adjusted Income above $10,000 and below $32,000 +
23% on Adjusted Income above $32,000 and below $50,000 +
28% of Adjusted Income above $50,000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
