Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please note: THE USER must not be allowed to order less than zero of an item, IF they do please set the amount that they

Please note: THE USER must not be allowed to order less than zero of an item, IF they do please set the amount that they order to zero! image text in transcribed
You will open a restaurant that sells three items: Salads, Pasta, and Cake. Your restaurant will do the following: 1. Ask the user if they want Salads then Drinks then Cakes . In all cases, you are prompting them for a yeso answer. For yes they can type y' or 'Y', and for no they can type 'n' or 'N' . If they want an item, find out how many . The user must not be allowed to order less than zero of an item, if they do, simply set the amount they order to zero. 2. Ask them for their age, this will affect the discount . Anyone 65 or older gets a 10% discount off the total cost BEFORE tax . Anyone 5 or younger gets all the cake they want for FREE! 3. Display a cost per item (before any discounts), a subtotal (before any discounts), a tax amount, a discount amount, and a grand total . Tax is 5% Sample run: EEEEEEEEEEEEEEEEEEE WELCOME TO THE RESTAURANT BEEEEEEEEEEE ====== Do you want Salads? (y): y How many?: 10 Do you want Drinks? (y): N Do you want Cakes? (y): Y How many?: 10 How old are you?: 68 ============================ 10 Salads @ $4.25 ==> $42.50 Drinks @ $1.05 ==> $0.00 10 Cakes @ $3.55 ==> $35.50 Subtotal: $78.00 Tax: $3.90 Discount: $7.80 EEEEEEEEEEEEEEEEEEEEEEEEEE Total: $74.10 Please come again

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

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago