Question: Code a Java program to do the following: Ask the user the following question using an Input Dialog Box. Format the menu to look similar
Code a Java program to do the following: Ask the user the following question using an Input Dialog Box. Format the menu to look similar to the one below "Which item Would You Like to Order?" A-Regular Coffee B- Mocha C- Latte Validate that the user entered A, B, C. If they made a mistake, force them to fix the error. Output to the price of the product they selected Use a Switch/Case for this. Regular Coffee $3.50 Mocha $4.75 Latte $5.00 Ask the user how many of those drinks they want. Use Scanner input for this Ask the user if they have a membership (use a Confirm Dialog Box for this). Members get a .50 cent discount (per drink) when they spend at least $4.00. Output the discount the customer received Output the final price for the drinks they ordered
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
