Question: 2. Solution Description Create a file Cafe1331.java that will simulate ordering from a restaurant. You will prompt the user for a menu item they would

 2. Solution Description Create a file Cafe1331.java that will simulate ordering

2. Solution Description Create a file Cafe1331.java that will simulate ordering from a restaurant. You will prompt the user for a menu item they would like to order. You will keep tract of the food the user wants, then calculate tax and tip. Cafe1331.java Name your program Cafe1331.java it should work as follows. 1. Print welcome message (see: example) with menu items and the following prices exactly as shown in the example output provided: a. Java Coffee: $13.31 b. Python Burger: $13.01 c. C Shake: $21.10 d. HTML Fries: $23.40 Ask the user "What would you like to order?" a. User should be able to enter a valid menu item name (ignoring lower/upper cases) b. If the user has selected Java Coffee, ask the user "Would you like to supersize this?" i. If "yes", multiply the price by 2.5 (ignoring lower/upper cases) C. If the user has selected the Python Burger, ask the user "Would you like to make this a combo?" 1. If "yes", add the HTML Fries to the order (ignoring lower/upper cases) d. If the user enters Hidden Item, ask the user "What is the secret password?" i. The secret password is any word that is greater than "cs1331rocks" ii. If the password is correct, print on a new line: "Correct, you get the Hidden Item!" then add the Hidden Item (price: $13.32) iii. If the password is incorrect, print on a new line "Incorrect, you get the C Shake." then add the C Shake If the user enters an invalid menu item, the program should terminate gracefully 3. Prompt the user for the percentage they would like to tip. i. Prompt: "What percentage would you like to tip?" ii. This should be entered as a non-negative decimal. iii. If user inputs a negative decimal, then the tip percentage is default 18% 4. Your program should calculate the final price with tip then print the subtotal (price of order), the tip (subtotal times tip percentage), and the total (subtotal + tip). Round to the nearest cent (2 decimal places). e

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!