In C++ choose a type of product to sell (food, apparel,electronics, cosmetics, housewares, etc.). Create aprogram which loads 4 parallel arrays with 20 itemseach. Use your own data. Do not replicatedata which I post, nor use data from anotherstudent. Make at least 4 categories, for example, if youwere categorizing animals, then you would use M for mammal, R forreptile, F for fish, and B for bird. Store the following4 parallel arrays in main(). Populate them with datausing initializer lists.
Requirements: Store your data in parallelarrays: Create the following functions:
Product (setw(20)) Price(setw(10)) Qty(setw(10)) Category(setw(10))Ext.Price (setw(10))
xxxxxxxxxxxxxxxxxxxx 9999999.99 9999999999 xxxxxxxxxx 9999999.99
AverageSales: 9999999.99 //NOTE: This is generated by findTotalSales()
TotalSales: 9999999.99 //NOTE: This is generated by findAverageSales()
Use a menu which will allow you to do the following with thedata (Have this loop with a sentinel to continue or stop as thelast menu item or 0):
Output: Show all reporting function outputincluding displayReport(), priceReport(), categoryReport() andsortByNameReport(), sortByPriceReport().
In C++ choose a type of product to sell (food, apparel, electronics, cosmetics, housewares, etc.). Create a program whi
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am