The owner of Quick Breakfast Cafe (qbc), has provided a text file (see given qbc_menu_prices.txt) that contains menu items, separated by a space, the delimiter. Each record in the file contains the following two fields: Item Description and the Sale Price. Read the file and present the user with a Quick Breakfast Cafe Menu, which may look like this: Quick Breakfast Cafe --Menu-- [1] Coffee $2.20 [2] Tea $1.05 [3] Milk $1.5 [4] Donuts $2.85 [5] Bagel $3.25 [6] Logout Prompt the user for the item and quantity they wish to purchase, which may look like: Enter your selection [1 - 6]: 1 Enter the quantity you wish to purchase: 1 To simplify the program, a user can only purchase one item at a time. A receipt is printed after each transaction, which includes the item, qty and price, followed by the total price including an 8% tax. The receipt may look like: Quick Breakfast Cafe -- Sales Receipt -- Item Qty Cost Coffee 1 $2.20 Total Cost With %8 Sales Tax: 2.38 After each transaction, the program returns to the Menu, ready for the next transaction. Each transaction is also logged in a file (call it qbc_sales_log.txt). Each record in the log file should include four fields: item, quantity, price and tax, separated by spaces. For example, the record in the log file may look: Coffee 1 2.20 0.18 Close the file after the Logout option is selected. Code must be modular with function prototypes, function definitions and function calls, as well as to include input validation

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

The owner of Quick Breakfast Cafe (qbc), has provided a text file (see given qbc_menu_prices.txt) that contains menu items, separated by a space, the delimiter. Each record in the file contains the following two fields:

Item Description and the Sale Price.

Read the file and present the user with a Quick Breakfast Cafe Menu, which may look like this:

Quick Breakfast Cafe

--Menu--

[1] Coffee $2.20

[2] Tea $1.05

[3] Milk $1.5

[4] Donuts $2.85

[5] Bagel $3.25

[6] Logout Prompt the user for the item and quantity they wish to purchase, which may look like:

Enter your selection [1 - 6]:

1 Enter the quantity you wish to purchase: 1

To simplify the program, a user can only purchase one item at a time.

A receipt is printed after each transaction, which includes the item, qty and price, followed by the total price including an 8% tax. The receipt may look like:

Quick Breakfast Cafe

-- Sales Receipt --

Item Qty Cost

Coffee 1 $2.20

Total Cost With %8 Sales Tax: 2.38

After each transaction, the program returns to the Menu, ready for the next transaction.

Each transaction is also logged in a file (call it qbc_sales_log.txt).

Each record in the log file should include four fields: item, quantity, price and tax, separated by spaces.

For example, the record in the log file may look: Coffee 1 2.20 0.18

Close the file after the Logout option is selected.

Code must be modular with function prototypes, function definitions and function calls, as well as to include input validation

C++ code please!

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY