Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

Describe the key parts of the technology design step.

Answered: 1 week ago