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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started