Question: Write a Java program that calculates and print out sales price(including tax). Your program will prompt the user for information about three parameters: integer number
Write a Java program that calculates and print out sales price(including tax). Your program will prompt the user for information about three parameters: integer number of price, real number of sales tax (%) and integer number of age of the customer. One method should receive the parameters and return how much money to pay to buy the good. For example, the call pay(100.0, 9.5, 25) should return 109.5. The customer should receive discount of 10% from the original price if age is >60, should receive discount of 5% from the original price if age is 55. For example, the call pay(100, 9.5, 65) should return 98.55
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
