Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

How does the concept of hegemony relate to culture?

Answered: 1 week ago

Question

2. What is the impact of information systems on organizations?

Answered: 1 week ago

Question

Evaluate the impact of technology on HR employee services.

Answered: 1 week ago