subject

Requirements description: Assume you work part-time at a Cafe. As the only employee who knows java programming, you help to write an ordering application for the store.
The following is a brief requirement description with some sample output.
1. Selecting Breakfast or Lunch(5 points)
When the program starts, it first shows option Breakfast or Lunch. A sample output is as follows.
=== Select Breakfast or Lunch: ===
1. Breakfast
2. Lunch
You are supposed to validate the input.
If the user enters a letter or a number not between 1 and 2, the user will see an error message.
A sample output for invalid number is as follows.
Select Breakfast or Lunch [1, 2]: 0
Error! Number must be greater than 0.
Select Breakfast or Lunch [1, 2]:
2. Selecting Coffee (20 points)
When the program continues, it shows a list/menu of coffee and their prices, then asks a user to select a coffee by entering an integer number. A sample output is as follows.
=== Select Coffee: ===
1 Espresso $3.50
2 Latte $3.50
3 Cappuccino $5.00
4 Cold Brew $3.00
5 Quit Coffee selection
Select a coffee [1, 5]:
You are supposed to validate the input.
If the user enters a letter or a number not between 1 and 5, the user will see an error message.
A sample output for invalid number is as follows.
Select a coffee [1, 5]: 0
Error! Number must be greater than 0.
Select a coffee [1, 5]:
In your program, you can hard-code the information for coffee (i. e., coffee names and prices) shown above, such as "1 Espresso $3.50" and use the hard-code price, such as 3.50, for calculation of a total price of the order.
After the user makes a choice for coffe, such as 2 for Latte. The program continues asking for selecting a coffee so that the user can have multiple coffee orders. The user can enter "5" to quit coffee selection. A sample output is as follows.
=== Select Coffee: ===
1 Espresso $3.50
2 Latte $3.50
3 Cappuccino $5.00
4 Cold Brew $3.00
5 Quit Coffee selection
Select Coffee: [1, 5]: 2
=== Select Coffee: ===
1 Espresso $3.50
2 Latte $3.50
3 Cappuccino $5.00
4 Cold Brew $3.00
5 Quit Coffee selection
Select Coffee: [1, 5]: 5
3. Selecting Food (10 points)
After Coffee selection, the program shows food selection. A sample output is as follows.
=== Select Food: ===
1 Tuna Sandwich $10.00
2 Chicken Sandwich $10.00
3 Burrito $12.00
4 Yogurt Bowl $8.00
5 Avocado Toast $8.00
6 Quit Food selection
Select Food: [1, 6]: 1
Input validation is needed and works as before. Like Coffee selection which allows selecting multiple Coffee orders, food selection also repeats after the user enters a valid number between 1 and 5.
You hard-code the information for food shown above, such as "1 Tuna Sandwich $10.00" and use the hard-code price, such as 10.00, for calculation of the total price of the order.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
Where would you click to edit the chart data?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 07:50
Most shops require the technician to enter a starting and ending time on the repair order to track the actual time the vehicle was in the shop and closed out by the office. this time is referred to as _ time ? a. comeback b. ro c. cycle d. lead
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
You know the right answer?
Requirements description: Assume you work part-time at a Cafe. As the only employee who knows java...
Questions
Questions on the website: 13722359