Question
A coffee shop sells 4 products (coffee, tea, bagel and muffin) for $3.65, $2.45, $1.50, and $1.85 each. Write an application that reads a series
A coffee shop sells 4 products (coffee, tea, bagel and muffin) for $3.65, $2.45, $1.50, and $1.85 each.
Write an application that reads a series of product number and quantity sold and generates a final order receipt that includes sold item name, quantity and total for each item as well as the total for the whole receipt including 6% sales tax.
You will need to have two classes, Product and Sales. Product class needs to have its appropriate instance variables, constructor, and setters and getters while Sales class is used as the deriver (test) class and takes care of sales and information display regarding the sale.
Your program should use a switch statement to determine the retail price for each product. It also should use a sentinel-controlled loop to determine when the program should stop looping and display the final results.
EL Problems @Javadoc [DeclarationConsole XOError Log LogCat
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