Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. 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

image text in transcribed

2. 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?" i. 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 e. 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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions

Question

How will the members be held accountable?

Answered: 1 week ago

Question

a. Do team members trust each other?

Answered: 1 week ago

Question

a. How will the leader be selected?

Answered: 1 week ago