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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!