Instructions This assignment must follow directions exactly. Create a class Lab02 with a main method, and put all of the following code into the main method: Print the prompt shown below and ask the user for the number of exemptions. The number of exemptions is an integer. Print the prompt shown below and ask the user for their gross salary. The gross salary represents dollars, which can be entered with or without decimal points. Print the prompt shown below and ask the user for their interest income. The interest income represents dollars, which can be entered with or without decimal points. Print the prompt shown below and ask the user for their capital gains income. The capital gains represents dollars, which can be entered with or without decimal points. Print the prompt shown below and ask the user for the amount of charitable contributions. The charitable contributions represents dollars, which can be entered with or without decimal points. Perform the calculation of total income, as shown in the Formula section. Perform the calculation of the adjusted income, as shown in the Formula section. Perform the calculation of the total tax, as shown in the Formula section. 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 + (<= $10,000)     15% on Adjusted Income above $10,000 and below $32,000 + ( > $10,000 but <= $32,000)     23% on Adjusted Income above $32,000 and below $50,000 + ( > $32,000 but <= $50,000)     28% of Adjusted Income above $50,000 ( > $50,000)   For the example above, we compute the Total Tax in the example above as follows: 15% * ($32,000.00-$10,000.00) = $3300.00 23% * ($50,000.00-$32,000.00) = $4140.00 28% * ($64,530.33-$50,000.00) = $4068.49 Adding up the above we get a Total Tax of $11,508.49, that's a significant tax bill.   Specifications Your program must meet the following specifications: Work on your own. The name of the source code file must be exactly Lab02.java Name it exactly: upper/lower case letters are important! Comments at the top with your name, short description of this program, e-Name (e-mail), date and course title. The output format must exactly match the example shown above, including blank line, white space and capitalization. Use variables to store everything, don't try to just do all the calculation in a print statement! You may use integer or floating point for the computations. The output should not report more than 2 digits after the decimal. Your program should be accurate to within $0.01.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Instructions

This assignment must follow directions exactly. Create a class Lab02 with a main method, and put all of the following code into the main method:

  • Print the prompt shown below and ask the user for the number of exemptions.

The number of exemptions is an integer.

  • Print the prompt shown below and ask the user for their gross salary.

The gross salary represents dollars, which can be entered with or without decimal points.

  • Print the prompt shown below and ask the user for their interest income.

The interest income represents dollars, which can be entered with or without decimal points.

  • Print the prompt shown below and ask the user for their capital gains income.

The capital gains represents dollars, which can be entered with or without decimal points.

  • Print the prompt shown below and ask the user for the amount of charitable contributions.

The charitable contributions represents dollars, which can be entered with or without decimal points.

  • Perform the calculation of total income, as shown in the Formula section.
  • Perform the calculation of the adjusted income, as shown in the Formula section.
  • Perform the calculation of the total tax, as shown in the Formula section.
  • 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 + (<= $10,000)

    15% on Adjusted Income above $10,000 and below $32,000 + ( > $10,000 but <= $32,000)

    23% on Adjusted Income above $32,000 and below $50,000 + ( > $32,000 but <= $50,000)

    28% of Adjusted Income above $50,000 ( > $50,000)

 

For the example above, we compute the Total Tax in the example above as follows:

15% * ($32,000.00-$10,000.00) = $3300.00

23% * ($50,000.00-$32,000.00) = $4140.00

28% * ($64,530.33-$50,000.00) = $4068.49

Adding up the above we get a Total Tax of $11,508.49, that's a significant tax bill.

 

Specifications

Your program must meet the following specifications:

  1. Work on your own.
  2. The name of the source code file must be exactly Lab02.java
  3. Name it exactly: upper/lower case letters are important!
  4. Comments at the top with your name, short description of this program, e-Name (e-mail), date and course title.
  5. The output format must exactly match the example shown above, including blank line, white space and capitalization.
  6. Use variables to store everything, don't try to just do all the calculation in a print statement!
  7. You may use integer or floating point for the computations.
  8. The output should not report more than 2 digits after the decimal.
  9. Your program should be accurate to within $0.01.

 

Note:

  • Comments at the top with your name, e-mail, date and course.
  • We expect programming assignments to be implemented using Java 1.8 (the version installed in the SB 0208, VMware Horizon, and OpenLab SRC 203 and SB Lab). Your code will be tested on the machines (or machines installed the same Java compiler and JVM) in the either SB 0208, VMware Horizon, or OpenLab, so make sure your code runs on those machines.
  • Submit your program to Blackboard.
  • No late, read the syllabus for the late policy.

 

I will test your program as follows (your submitted program name is Lab02.java)

  javac Lab02.java

  java Lab02

Note: my input values for testing your program varies, for example the exemptions maybe 1 and the Gross Salary may be 48520.31, … etc.

Income Tax
Description
The program allows the user to input some of the information that normally appears on a tax form,
and then it calculates a tax bill according to the formulas described below. WARNING: Be aware that
the tax computation shown here is greatly simplified and should not be used for calculation of your
real taxes!
Instructions
For this assignment, you must follow directions exactly. Create a class Lab02 with a main method, and
put all of the following code into the main method:
Print the prompt shown below and ask the user for the number of exemptions.
The number of exemptions is an integer.
v Print the prompt shown below and ask the user for their gross salary.
The gross salary represents dollars, which can be entered with or without decimal points.
v Print the prompt shown below and ask the user for their interest income.
The interest income represents dollars, which can be entered with or without decimal points.
Print the prompt shown below and ask the user for their capital gains income.
The capital gains represents dollars, which can be entered with or without decimal points.
Print the prompt shown below and ask the user for the amount of charitable contributions.
The charitable contributions represents dollars, which can be entered with or without decimal
points.
Perform the calculation of total income, as shown in the Formula section.
Perform the calculation of the adjusted income, as shown in the Formula section.
v Perform the calculation of the total tax, as shown in the Formula section.
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 + (<= $10,000)
15% on Adjusted Income above $10,000 and below $32,000 + (> $10,000 but <= $32,000)
23% on Adjusted Income above $32,000 and below $50,000 + (> $32,000 but <= $50,000)
28% of Adjusted Income above $50,000 ( > $50,000)
Transcribed Image Text:Income Tax Description The program allows the user to input some of the information that normally appears on a tax form, and then it calculates a tax bill according to the formulas described below. WARNING: Be aware that the tax computation shown here is greatly simplified and should not be used for calculation of your real taxes! Instructions For this assignment, you must follow directions exactly. Create a class Lab02 with a main method, and put all of the following code into the main method: Print the prompt shown below and ask the user for the number of exemptions. The number of exemptions is an integer. v Print the prompt shown below and ask the user for their gross salary. The gross salary represents dollars, which can be entered with or without decimal points. v Print the prompt shown below and ask the user for their interest income. The interest income represents dollars, which can be entered with or without decimal points. Print the prompt shown below and ask the user for their capital gains income. The capital gains represents dollars, which can be entered with or without decimal points. Print the prompt shown below and ask the user for the amount of charitable contributions. The charitable contributions represents dollars, which can be entered with or without decimal points. Perform the calculation of total income, as shown in the Formula section. Perform the calculation of the adjusted income, as shown in the Formula section. v Perform the calculation of the total tax, as shown in the Formula section. 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 + (<= $10,000) 15% on Adjusted Income above $10,000 and below $32,000 + (> $10,000 but <= $32,000) 23% on Adjusted Income above $32,000 and below $50,000 + (> $32,000 but <= $50,000) 28% of Adjusted Income above $50,000 ( > $50,000)
For the example above, we compute the Total Tax in the example above as follows:
15% * ($32,000.00-$10,000.00) = $3300.00
23% * ($50,000.00-$32,000.00) = $4140.00
28% * ($64,530.33-Ş50,000.00) = $4068.49
Adding up the above we get a Total Tax of $11,508.49, that's a significant tax bill.
Specifications
Your program must meet the following specifications:
1. Work on your own.
2. The name of the source code file must be exactly Lab02.java
3. Name it exactly: upper/lower case letters are important!
4. Comments at the top with your name, short description of this program, e-Name (e-mail), date
and course title.
5. The output format must exactly match the example shown above, including blank line, white
space and capitalization.
6. Use variables to store everything, don't try to just do all the calculation in a print statement!
7. You may use integer or floating point for the computations.
8. The output should not report more than 2 digits after the decimal.
9. Your program should be accurate to within $0.01.
Note:
> Comments at the top with your name, e-mail, date and course.
We expect programming assignments to be implemented using Java 1.8 (the version installed in
the SB 0208, VMware Horizon, and Openlab SRC 203 and SB Lab). Your code will be tested on
the machines (or machines installed the same Java compiler and JVM) in the either SB8 0208,
VMware Horizon, or Openlab, so make sure your code runs on those machines.
> Submit your program to Blackboard.
> No late, read the syllabus for the late policy.
Iwill test your program as follows (your submitted program name is Lab02.java)
javac Lab02.java
java Lab02
Note: my input values for testing your program varies, for example the exemptions maybe 1 and
the Gross Salary may be 48520.31, . etc.
Transcribed Image Text:For the example above, we compute the Total Tax in the example above as follows: 15% * ($32,000.00-$10,000.00) = $3300.00 23% * ($50,000.00-$32,000.00) = $4140.00 28% * ($64,530.33-Ş50,000.00) = $4068.49 Adding up the above we get a Total Tax of $11,508.49, that's a significant tax bill. Specifications Your program must meet the following specifications: 1. Work on your own. 2. The name of the source code file must be exactly Lab02.java 3. Name it exactly: upper/lower case letters are important! 4. Comments at the top with your name, short description of this program, e-Name (e-mail), date and course title. 5. The output format must exactly match the example shown above, including blank line, white space and capitalization. 6. Use variables to store everything, don't try to just do all the calculation in a print statement! 7. You may use integer or floating point for the computations. 8. The output should not report more than 2 digits after the decimal. 9. Your program should be accurate to within $0.01. Note: > Comments at the top with your name, e-mail, date and course. We expect programming assignments to be implemented using Java 1.8 (the version installed in the SB 0208, VMware Horizon, and Openlab SRC 203 and SB Lab). Your code will be tested on the machines (or machines installed the same Java compiler and JVM) in the either SB8 0208, VMware Horizon, or Openlab, so make sure your code runs on those machines. > Submit your program to Blackboard. > No late, read the syllabus for the late policy. Iwill test your program as follows (your submitted program name is Lab02.java) javac Lab02.java java Lab02 Note: my input values for testing your program varies, for example the exemptions maybe 1 and the Gross Salary may be 48520.31, . etc.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education