Question
JAVA Assignment: Can you please write a program in simple way. Thank you. Question: A bakery sells three types of muffins whose prices are as
JAVA Assignment: Can you please write a program in simple way. Thank you.
Question:
A bakery sells three types of muffins whose prices are as follows: 1- blueberry muffin, $2.98 2- chocolate chip muffin, $4.50 and 3- banana muffin, $9.98. You will write an application which calculates the total retail value of the sold muffins. Please check the following requirements: Create a sentinel-controlled while loop. The flag value will be 0. Display flag value in your messages. Display the menu and ask for the muffin number (int) (1 for blueberry one, 2 for chocolate chip one, or 3 for banana one). Then, ask for the quantity sold for the related muffin (int). Create a switch a statement to calculate the retail price for each muffin. When the user terminates the application, display the total retail value (double) of all muffins. Additionally, add an if-else statement to check whether the user only enters 1, 2, 3 or 0. If the user enters invalid input, display a message that the user can only enter 1, 2, 3 or 0. Then, ask for new input. (35 pts) UPLOAD Sales.java
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