Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write C++ Code My Happy Shop decided to create a computerized system to maintain the shop inventory. The shop sells variety of garments and the
Write C++ Code
My Happy Shop decided to create a computerized system to maintain the shop inventory. The shop sells variety of garments and the garments are categorized to particular group. Each category is given a code and the explanation for each code is given bellow. CODE B F M EXPLANATION baby wear children wear ladies wear menswear | You as a programmer are required to write a program which contains a menu as bellow: My Happy Shop MAIN MENU 1) Add a record 2) Display sales report for a category 3) Display sales report for all category 4) Exit Guideline: The program should enable the user to choose any sub menu and it would only stop when the user chooses the sub menu Exit. 1) Add a record This sub menu will add a sales record for a particular garment into arrays _itemNumber, itemCode and price). Each record consists of three fields which are item number, item code and price. The user may add more than one record at a time. You can use sentinel value to control the loop. Example of records: Item Number ItemCode Price B101 C101 B102 C105 F103 M101 C104 B F M 3 Town 10.00 14.00 8.00 24.00 50.90 30.00 23.00 2) Display sales report for a category In this sub menu the sales report of particular category will be displayed. The category shall be chosen by the user. SALES REPORT FOR BABY WEAR Item Number Price B101 RM10.00 B102 RM8.00 Total Sales RM18.00 3) Display sales report for all category In this sub menu the sales report for all the categories will be displayed SALES REPORT FOR ALL CATEGORIES Sales Category Baby wear Children wear Ladies wear Menswear RM18.00 RM61.00 RM50.90 RM30.00 Total Sales RM159.90 4) Exit Before exit from the program store all the data into a file (myoutput.dat) as shown below. B101 B 10.00 C101 C 14.00 B102 B 8.00 C105 C 24.00 F103 F 50.90 M101 M 30.00 C104 C 23.00 myoutput.datStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started