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, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Jamie has to enter the names, employee id’s, and income of a group of employees into a worksheet. which option will jamie use to describe the data
Answers: 3
question
Computers and Technology, 24.06.2019 03:30
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Fast answer i need for apex ! smartphones should be banned from the classroom in public schools so that students cannot cheat on test so easily? which is an example of a counter argument to the thesis above? a.the classroom is a place for learning not for making phone calls b. smartphones are useful learning tools in the modern classroom c.banning smartphones will not students pay attention to teachers any better d. banning smartphones would decreased incidents of theft
Answers: 2
You know the right answer?
Requirements description: Assume you work part-time at a Cafe. As the only employee who knows java...
Questions
question
Mathematics, 22.04.2021 03:20
question
Computers and Technology, 22.04.2021 03:20
question
History, 22.04.2021 03:20
question
History, 22.04.2021 03:20
question
Mathematics, 22.04.2021 03:20
question
History, 22.04.2021 03:20