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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, LindseyN1
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
Answers: 3
image
Computers and Technology, 22.06.2019 12:10, tragesserj
1. declare a constant named cents_per_pound and initialize with 25. 2. get the shipping weight from user input storing the weight into shipweightpounds. 3. using flat_fee_cents and cents_per_pound constants, assign shipcostcents with the cost of shipping a package weighing shipweightpounds.
Answers: 2
image
Computers and Technology, 23.06.2019 02:30, paolaviviana
Experimental data that is expressed using numbers is said to be
Answers: 1
image
Computers and Technology, 23.06.2019 22:00, rocksquad9125
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
You know the right answer?
Requirements description: Assume you work part-time at a Cafe. As the only employee who knows java...

Questions in other subjects: