Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[JAVA] Thanks in advance for your help! Write a program that computes the amount owed given the cost of an item and the quantity purchased.
[JAVA] Thanks in advance for your help!
Write a program that computes the amount owed given the cost of an item and the quantity purchased. It should also include a 7.5% sales tax (declare the sales tax as a constant (final) int the main method. Remember, constants should be all capitals ). The program should continue to compute how much is owed until the user indicates they want to end. End with a new line
Sample Output
Enter the cost of the item: 1.25 Enter the quantity purchased: 5 Amount Due: 6.72 Do you have another customer (y/n): Y Enter the cost of the item: 2.74 Enter the quantity purchased: 3 Amount Due: 8.84 Do you have another customer (y/n): y Enter the cost of the item: .99 Enter the quantity purchased: 15 Amount Due: 15.96 Do you have another customer (y/n): n
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