Question: HW3: for this homework, you will create a Java program that will calculate the amount of money required to buy an expresso drink with additional

 HW3: for this homework, you will create a Java program that

HW3: for this homework, you will create a Java program that will calculate the amount of money required to buy an expresso drink with additional cream or sugar using if / else statements. Offer a selection of at least 3 different expresso drinks with corresponding numbers for input. Charge different prices for the 3 drinks. Validate the input is one of the offered expresso selections, otherwise, notify the user of an incorrect entry and set the expresso drink value to zero. If the user entered a valid value for their expresso drink, offer them a condiment such as cream and / or sugar factoring that into the total cost (charge at least 0.25). Calculate the total cost of the drink and display it to the user. Example: Psuedo Code to show flow: 1. Declare variables and initialize 2. Output: Enter the number of expresso coffee you want to order: Americano - 1, Cappuccino - 2, Mocha - 3? 3. Input from user 4. Validate Input 5. Determine expresso drink and charge price 6. Output: Add Cream - 4 or Sugar - 5 or 0 for no? 7. Input from user 8. Output: Total cost of your expresso is

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!