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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!