Write a program that displays the income tax due on taxable income entered by the user. Have the user enter the tax in the main() method, and then call a calcTax() method to compute the tax. Print the value returned. The calcTax() method should have one parameter - income - and return a double - tax. The tax is calculated as follows:  Income  Tax Due  $0 - $50,000 5%   $50,000-$100,000  $2,500 + 10% of (income > $50,000)  > $100,000  $7,500 + 15% of (income > $100,000)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question

Write a program that displays the income tax due on taxable income entered by the user. Have the user enter the tax in the main() method, and then call a calcTax() method to compute the tax. Print the value returned.

The calcTax() method should have one parameter - income - and return a double - tax.

The tax is calculated as follows:

 Income  Tax Due
 $0 - $50,000 5% 
 $50,000-$100,000  $2,500 + 10% of (income > $50,000)
 > $100,000  $7,500 + 15% of (income > $100,000)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Returning value from Function
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning