CREATE IN JAVA PLEASE 1. Create a class named Taxes. 2. Create two instance variables, one variable named taxDue and the other taxBracket. Both instance variables should be double. 3. Create a constructor that has an argument type double named tb. Initialize the taxDue to zero and the taxBracet to tb. 4. Create a method named calculateTaxDue. The method should not return anything and should have two arguments, both doubles. One argument should be totalIncome and the other should be taxPaid. 5. The calculateTaxDue should multiple the totalIncome by the taxBracket and assign it to a local variable named calcTax. 6. The calculateTaxD should subtract calcTax from taxPaid and assign it to taxDue. 7. Create a method to return taxDue. 1. Create a tester class. 2. Import Scanner. 3. Add the plumbing. 4. Create a scanner object. 5. Create an array to hold five doubles and name it income. 6. Create an array to hold five doubles and name it paid. 7. Create a for loop that will run from 0 to 5 (not including 5). Note there will be five items. 8. Ask the user to input for a double representing the tax the user received. 9. Assign the answer to an element in the income array. 10. Create a while loop that will run from 0 to 5 (not including 5). Note there will be five items. 11. Ask the user to input a double representing the tax paid. 12. Assign the answer to an element in the paid array. 13. Create a totalIncome double variable and assign it the value of 0. 14. Create a totalPaid double variable and assign it the value of 0. 15. Using an enhance for loop sum the elements in the array income and assign the result to a totalIncome variable. 16. Using an enhanced for loop, sum the elements in the array paid and assign the result to the totalPaid variable. 17. Create an object of type Taxes with an argument of .20. 18. Call the calculateTaxDue method with the arguments totalIncome and totalPaid. 19. Call the get method and print the results.

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

CREATE IN JAVA PLEASE

1. Create a class named Taxes.
2. Create two instance variables, one variable named taxDue and the other taxBracket. Both
instance variables should be double.
3. Create a constructor that has an argument type double named tb. Initialize the taxDue to
zero and the taxBracet to tb.
4. Create a method named calculateTaxDue. The method should not return anything and
should have two arguments, both doubles. One argument should be totalIncome and the
other should be taxPaid.
5. The calculateTaxDue should multiple the totalIncome by the taxBracket and assign it to a
local variable named calcTax.
6. The calculateTaxD should subtract calcTax from taxPaid and assign it to taxDue.
7. Create a method to return taxDue.
1. Create a tester class.
2. Import Scanner.
3. Add the plumbing.
4. Create a scanner object.
5. Create an array to hold five doubles and name it income.
6. Create an array to hold five doubles and name it paid.
7. Create a for loop that will run from 0 to 5 (not including 5). Note there will be five items.
8. Ask the user to input for a double representing the tax the user received.
9. Assign the answer to an element in the income array.
10. Create a while loop that will run from 0 to 5 (not including 5). Note there will be five items.
11. Ask the user to input a double representing the tax paid.
12. Assign the answer to an element in the paid array.
13. Create a totalIncome double variable and assign it the value of 0.
14. Create a totalPaid double variable and assign it the value of 0.
15. Using an enhance for loop sum the elements in the array income and assign the result to a
totalIncome variable.
16. Using an enhanced for loop, sum the elements in the array paid and assign the result to the
totalPaid variable.
17. Create an object of type Taxes with an argument of .20.
18. Call the calculateTaxDue method with the arguments totalIncome and totalPaid.
19. Call the get method and print the results.

Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
void method
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