Question: Please write a C++ program that satisfies the above instructions and output the given sample. Q. Mickey Mouse works at the ECE114 Food Market where


Please write a C++ program that satisfies the above instructions and output the given sample.
Q. Mickey Mouse works at the ECE114 Food Market where sells eggs, milk, bread, and apples only. The unit cost of each item is as follows: No. Item Name Unit Price ($0 0.20 Milk 4.99 Bread 2.75 Apple Write a C++ program that calculates a customer's total expense and generates a receipt. Your program should define a struct type (using typedefl called ITEM, which consists of three elements: "name (e.g. char namel 100, "price"(e.g. float price), and quantity"(e.g. int quantity). Then it needs to create an array of four ITEM structs and initialize the array with the above item information (Each quantity is initialized to zero.). Then it should display a menu and continue to ask the user to buy food until the answer is 'q' .Assume the user enters correct inputs No input validation is needed. Your program should be able to print exactly the same as the following sample output. You don't need to consider sales tax. Hints: 1. You may use a char variable to choose an item number or 'q' to exit. 2. Please use the cin and cout objects, rather than the printfand scanf C functions. If you meet a buffered output issue in Xcode, you may try to compile your program with the Terminal console application. 3. You may print the menu using literal strings with cout. You don't need to deal with formatted output in C++ now. 4. You may initialize your array of items in the main function. Sample output: Welcome to ECE114 Food Market! No I Item Name I Unit PriceC$) 0.20 Egg 2 Milk 4.99 Bread 2.75 4 Apple I 1.25 (continued on next page)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
