Question: Write the method calcTax(sales, state) which will receive a double and a 2 letter state abbreviation and return the tax. (use only 3 states NY
Write the method calcTax(sales, state) which will receive a double and a 2 letter state abbreviation and return the tax. (use only 3 states NY 8%, IN 7% and KY 6%) writtten in JAVA
So far I have
//6.calcTax(sales, state) public static boolean calcTax(double a){ double result = 0; switch(stateInt){ case "IN": return = .07 * a; case "NY": return = .08 * a; case "KY": return = .06 * a; }//switch }//6.calcTax
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
