wasn't happy with the output
Preparing tax for customer #1
Preparing tax for customer #2
Results....
So I formatted the testTax code below
Code:
class TestTax {
public static void main(String[] args) {
double grossIncome; //local variables
String state;
int dependents;
grossIncome = 50000;
dependents = 2;
state = "NJ";
Tax t = new Tax(grossIncome, state , dependents);
double yourTax = t.calcTax();//calculating tax
double yourTaxEuros = t.convertTaxEuros();
//Printing Result
System.out.println("Your tax is " + yourTax);
System.out.println("Your tax in Euros " + yourTaxEuros);
Tax t2 = new Tax(65000, "TX", 4);
double hisTax = t2.calcTax();
double hisTaxEuros = t2.convertTaxEuros();
//Printing Result
System.out.println("His tax is " + hisTax);
System.out.println("His tax in Euros " + hisTaxEuros);
Tax t3 = new Tax(79000, "FL", 6);
double t3Tax = t3.calcTax();
double t3TaxEuros = t3.convertTaxEuros();
//Printing Result
System.out.println("Customer #" + Tax.customerCounter + " tax is $" + t3Tax);
System.out.println("Customer #" + Tax.customerCounter + " tax in Euros " + t3TaxEuros);
}
the output now flows better and is easier to read.
Preparing the tax data for customer #1
Your tax is 16300.0
Your tax in Euros 13040.0
Preparing the tax data for customer #2
His tax is 21050.0
His tax in Euros 16840.0
Preparing the tax data for customer #3
Customer #3 tax is $25470.0
Customer #3 tax in Euros 20376.0