Question: Description: Your program will allow the user to make an order at Mejia Coffee, which will include the following functionality: 1. Display Menu 2.
Description: Your program will allow the user to make an order at Mejia Coffee, which will include the following functionality: 1. Display Menu 2. Add Item to Order 3. View Cart 4. Checkout 5. Exit Program Instructions 1. Your program must read from the file "starbucks_menu.txt" which will include the following: Item Name Is Beverage Item Cost The name of the Starbucks item True if it's a beverage, false if it's a bakery The total cost of the item Starbucks item Welcome to Mejia Coffee! Please select an option below to continue: 1. Display Menu 2. Add item to order 3. View cart 4. Checkout 5. Exit Mejia Coffee Display Menu If the user selects this option, you will display the Mejia Coffee menu to the user onto the terminal. To do this, you need to read the file and display each line of it. We will provide a template so it looks like the following on the terminal: | MEJIA COFFEE MENU | Item Name isBeverage? Cost Mocha Cookie_Crumble Frapp | Impossible_Breakfast Sandwich | Almond Shaken Espresso | Vanilla Latte | true | $3.95 | false | $4.65 | ++ true | $2.95 | ++ true | $3.85 | Chicken Bacon_Panini | false | $4.85 | +-------+---------- Iced Black Tea | true | $3.65 | + Birthday Cake Pop | false | $2.75 | Cold Brew true | $3.95 | | Very Berry_Hibiscus Refresher | true | $4.25 | | Cheese Danish | false | $4.95 | | Iced Passion Tango_Tea_Lemonade | true | $3.55 | -+ | Red Velvet Frappuccino | true | $4.75 | Chocolate Croissant | false | $4.25 | Banana Nut Bread | Carrot Cake | -+-------+ false | $3.65 | false | $5.55 | ++ Add item to order The user must enter the name exactly as shown on the menu to add to cart. Please enter the name of the item as shown on the menu: > User_enters_name_here_as_such If the item is a beverage, you must ask the user what size they would like. For example: Please enter the name of the item as shown on the menu: > Red Velvet Frappuccino What size would you like for your drink? 1. Tall (+$0.00) 2. Grande (+$1.50) 3. Venti (+$2.75) > 3 Item was added to your cart. If the item is a bakery item, you must ask the user how many they would like. For example: Please enter the name of the item as shown on the menu: > Birthday Cake Pop How many would you like? > 2 Item was added to your cart. If the item the user entered is not found, make sure to display a message that lets them know: I'm sorry. We do not carry that item. If the item the user entered was found, make sure to display a message that lets them know: Item was added to your cart. IMPORTANT: In this step, you will accumulate the prices of each item into a variable. This is also where you will update your cart by updating your cart value that will store all the items the user has selected and the item's price, as shown under View Cart. View Cart If the cart is empty, the cart should be shown as such: YOUR CART- Otherwise: YOUR CART- Red Velvet Frappuccino $4.75 Carrot Cake $5.55 Checkout When the user is ready to check out, display their cart, the subtotal, and total after tax (6.75%). An example is shown below: YOUR CART- Red Velvet Frappuccino $4.75 Carrot Cake $5.55 Subtotal: $10.3 Total after tax: $10.99 Lastly, before you exit the program, you will ask the user to enter CHECKOUT to confirm their purchase. Please enter CHECKOUT to complete your purchase. > CHECKOUT Thank you for your purchase. Enjoy! Exit Mejia Coffee If the user selects the exit option, all cart and progress done throughout the program is lost and will exit the user out of the program. Display the message: Thank you for shopping at Mejia Coffee. Item Name Is Beverage Cost Mocha Cookie_Crumble_Frapp TRUE 3.95 Impossible Breakfast Sandwich FALSE 4.65 Almond Shaken Espresso TRUE 2.95 Vanilla Latte TRUE 3.85 Chicken Bacon_Panini FALSE 4.85 Iced Black Tea TRUE 3.65 Birthday Cake Pop FALSE 2.75 Cold Brew TRUE 3.95 Very Berry_Hibiscus Refresher TRUE 4.25 Cheese Danish FALSE 4.95 Iced Passion Tango_Tea_Lemonade TRUE 3.55 Red Velvet Frappuccino TRUE 4.75 Chocolate Croissant FALSE 4.25 Banana Nut Bread FALSE 3.65 Carrot Cake FALSE 5.55
Step by Step Solution
3.51 Rating (154 Votes )
There are 3 Steps involved in it
Here is the Python code for your problem This Python code is designed to simulate the operations of a coffee shop It provides a menu for the user to either purchase a cup of coffee view the sales stat... View full answer
Get step-by-step solutions from verified subject matter experts
