Question: You are asked to create a Java program that calculates a tax table for a city where there is a city, county, and state tax.
You are asked to create a Java program that calculates a tax table for a city where there is a city, county, and state tax. The city tax rate is 10%, the county rate is 5%, and the state rate is 1.2%. The state rate is not applicable unless the purchase is over $3,000.00, and the county rate only applies if the purchase is over $10,000.
a) Calculate the total amount due in taxes for a purchase of $11,000. Show all your work, including the amount of each tax individually.
b) Sketch a flow chart for determining the total tax rate. Ask the user to enter all the tax rates and a purchase amount first, then show all the steps to calculate and print the correct tax amount.
c) Assume that you have a function
public static double calculateTaxAmount(double purchaseAmount,
double cityTaxRate,
double countyTaxRate,
double stateTaxRate)
In the space below, write the code that you would use to calculate the total tax due based on your flowchart in part (b). The function should return the total taxes owed. Note that the function's parameters include the purchase amount and all the tax rates, so your function should not include reading the values from the user (i.e., no Scanner is required).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
