# 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,0005%  \$50,000-\$100,000 \$2,500 + 10% of (income > \$50,000) > \$100,000 \$7,500 + 15% of (income > \$100,000)

Question
22 views

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)
check_circle

Step 1

The program that displays the income tax due on taxable income is created in java.

In calTax() method if else statement used to compute tax due.

Step 2

Program:

//import Scanner

import java.util.Scanner;

//Class created

public class texCalc {

//main method

public static void main(String args[]) {

//Scanner input

Scanner input=new Scanner(System.in);

//varible declaration

double income;

//display message to user

//input from user

income=input.nextDouble();

//calling method calcTax()

double result=calcTax(income);

//printing returned value

System.out.println("the income tax due on taxable income: \$"+result);

}

//calcTax() method

public static double calcTax(double income)

{

//varible declared

double tax;

//computed tax for  \$0 - \$50,000

if(income>=0 && income<=50000)

{

tax=income*0.05;

&...

### Want to see the full answer?

See Solution

#### Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in