/*
Author: Aaron Hurt
Class: COMP 313m, Intro to Java
Time: Saturday, 8 to 1.
Assignment: Midterm Question
Program description:  Calculate amount of
taxes to be paid given an certain annual income.
*/

import java.text.*;

public class taxes {
	public static void main(String[] args) {
		//declare variables
		double income; //the income we are checking
		double taxes; //the amount of tax to be paid
		//get input
		income = GetData.getDouble("Enter Taxable Income for 2004 Fiscal Year");
		//do checking
		if (income <= 15000)
			taxes = income * 0.0;
		else if (income <= 22000)
			taxes = income * 0.08;
		else if (income <= 30000)
			taxes = income * 0.12;
		else if (income <= 48000)
			taxes = income * 0.18;
		else if (income <= 75000)
			taxes = income * 0.25;
		else
			taxes = income * 0.30;
		//taken from inclass overhead
		DecimalFormat out = new DecimalFormat("\u00a4#,##0.00");
		System.out.println("You must pay: "+out.format(taxes));
	}
}
