n C++ Design a program for a coffee shop. Make a menu driven program that allows the user to select items from a menu and add them to an order. Once the user is satisfied with their order, they can output a sales receipt. Display the receipt on the console and save the receipt in a txt file: qbc_sales_receipt.txt. . This coffee shop menu includes Coffee 1.85 Tea 1.05 Milk 1.25 Donut 2.25 Bagel 2.75 After each item is added to order, display a message for the user indicating the item name and total price (so 2 items at 2.50 each display 5.00) The program ends when the user prints their sales receipt The sales receipt should contain: -Line item for grand total -Line item for sales tax which is 8% -Line items with quantity, item name, and item price total If nothing is ordered, display “No receipt required. Thanks!” Modular Functions Requirement: main, displayMenu, displaySalesReceipt Input validation required The final display should read something like this Would you like to place an order? (y/n): y ITEM Price ******************** 1. Coffee 1.85 2. Tea 1.05 3. Milk 1.25 4. Donut 2.25 5. Bagel 2.75 ******************** Please make a selection: 2 How many Tea would you like: 4 4 of Tea added to order for 4.2 Would you like to continue ordering? (y/n): y ITEM Price ******************** 1. Coffee 1.85 2. Tea 1.05 3. Milk 1.25 4. Donut 2.25 5. Bagel 2.75 ******************** Please make a selection: 1 How many Coffee would you like: 3 3 of Coffee added to order for 5.55 Would you like to continue ordering? (y/n): n SALES RECEIPT ******************** 4 Tea $4.2 3 Coffee $5.55 ******************** Subtotal: $9.75 Tax Total: $0.78 ******************** Total: $10.53

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter8: Advanced Data Handling Concepts
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question

In C++

Design a program for a coffee shop. Make a menu driven program that allows the user to select items from a menu and add them to an order. Once the user is satisfied with their order, they can output a sales receipt. Display the receipt on the console and save the receipt in a txt file: qbc_sales_receipt.txt. . This coffee shop menu includes

Coffee 1.85
Tea 1.05
Milk 1.25
Donut 2.25
Bagel 2.75

After each item is added to order, display a message for the user indicating the item name and total price (so 2 items at 2.50 each display 5.00)

The program ends when the user prints their sales receipt
The sales receipt should contain:
-Line item for grand total
-Line item for sales tax which is 8%
-Line items with quantity, item name, and item price total
If nothing is ordered, display “No receipt required. Thanks!”

Modular Functions Requirement: main, displayMenu, displaySalesReceipt
Input validation required

The final display should read something like this

Would you like to place an order? (y/n): y

ITEM Price

********************

1. Coffee 1.85

2. Tea    1.05

3. Milk   1.25

4. Donut 2.25

5. Bagel 2.75

********************

Please make a selection: 2

How many Tea would you like: 4

4 of Tea added to order for 4.2

Would you like to continue ordering? (y/n): y

ITEM Price

********************

1. Coffee 1.85

2. Tea    1.05

3. Milk   1.25

4. Donut 2.25

5. Bagel 2.75

********************

Please make a selection: 1

How many Coffee would you like: 3

3 of Coffee added to order for 5.55

Would you like to continue ordering? (y/n): n

SALES RECEIPT

********************

4    Tea $4.2

3    Coffee    $5.55

********************

Subtotal: $9.75

Tax Total:    $0.78

********************

Total:    $10.53

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

How to turn this code that it accepts string input for the choice of drink instead of using int? 

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,