Академический Документы
Профессиональный Документы
Культура Документы
/*
* Main.java
*
* Created on October 27, 2008, 9:05 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package incometax;
import java.text.*;
/**
*
* @author david johnson
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Please enter your income: ");
double income = MyInput.readDouble();
double incomeTax = calculateIncomeTax(income);
NumberFormat currency = NumberFormat.getCurrencyInstance();
System.out.println("The income tax is: " + currency.format(incomeTax));
}
else if(income <= 7000)
{
tax = 142.50 + (income - 5250)* .05;
}
else
{
tax = 230.0 + (income - 7000)*.06;
}
return tax;
}