Description: Your program will allow the user to make an order at Mejia Coffee, which will...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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 the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
re Regular Languages and Finite Automata (a) Let L be the set of all strings over the alphabet {a, b} that end in a and do not contain the substring bb. Describe a deterministic finite automaton...
-
Examine the major components of a marketing plan.
-
Regarding the variables in a regression analysis, a. What is the independent variable called? b. What is the dependent variable called?
-
Find an equation of the tangent line to the graph at the given point. To print an enlarged copy of the graph, go to MathGraphs.com. Cruciform xy-9x-4y = 0 y 4 (-4, 23)- H -6-4-2 J X H +x 246
-
The Anchor Glass Container Corporation and its parent company, Consumers Packaging, Inc. (CPI), entered into a series of agreements with Encore Glass, Inc., to supply glass containers of a specific...
-
(Conversion of Bonds) On January 1, 2009, Trillini Corporation issued $3,000,000 of 10-year, 8% convertible debentures at 102. Interest is to be paid semiannually on June 30 and December 31. Each...
-
he accounts from the Adjusted Trial Balance are listed in alphabetical order. What is the total longminusterm liabilities? Baker Service Company Adjusted Trial Balance September 30, 2025 Balance...
-
A national catalog and Internet retailer has three warehouses and three major distribution centers located around the country. Normally, items are shipped directly from the warehouses to the...
-
1. How do you define niche tourism and niche attractions? 2. How do I analyze the Reward, Enrichment, Adventuresome & Learning model for experiencing niche tourism based on the Kolb (1984) model of...
-
Why are my favourite food bad for me?Why are my favourite things to eat and drink bad for my health? Just a week ago we were told that drinking any amount of alcohol increases your risk of cancer. Do...
-
To what extent has managed care been successful in containing health care costs and has the impact on quality been an increase or a decrease with managed care versus traditional indemnity insurance...
-
HOW to use three major marketing tools (i.e., Research, SWOT, 4Ps). Please note that the 4Ps of Marketing (tool) and the SWOT Analysis tool consist of four elements each. please describe ALL the...
-
Hypertension Identify the disease. What are the causes? What are the risk factors? Give a brief definition and describe in detail the pathophysiology of the disorder. Explain how the disorder is...
-
1. NPV and IRR analysis of projects Thomas Company is considering two mutually exclusive projects. The firm, which has a cost of capital of 12?%, has estimated its cash flows as shown in the...
-
CHE 308 Chemical Process Analysis Sessional Class Work 1 Time: 60 min In a sulfuric acid plant, SO2 is fed to a reactor with 10% excess air (at SATP). The reactor operates at 2700F and 1 atm. The...
-
Name some of the various types of financial intermediaries described in the chapter and indicate the primary reason(s) each was created.
-
For all of the following words, if you move the first letter to the end of the word, and then spell the result backwards, you will get the original word: banana dresser grammar potato revive uneven...
-
Suppose that we are selling boxes of candy for a fund-raiser. We have five kinds of candy to sell: Mints, Chocolates with Nuts, Chewy Chocolates, Dark Chocolate Creams, and Sugar-Free Suckers. We...
-
Write a program that determines the change to be dispensed from a vending machine. An item in the machine can cost between 25 cents and a dollar, in 5 cent increments (25, 30, 35, , 90, 95, or 100),...
-
Which of the following statements about Islamic banking is not true? a. Interest (known as Riba) is prohibited. b. Conventional interest is considered by scholars to result in inequality and...
-
Which of the following statements is true? a. Murabaha, an equity instrument, is a sales contract in which the asset is sold by the bank to the customer at costplus- profit. b. Salam is a forward...
-
The relationship between an Islamic bank and its customers is that of a: a. Partner/investor b. Buyer and seller c. Lessor/lessee d. All of the above
Study smarter with the SolutionInn App