In C++ choose a type of product to sell (food, apparel, electronics, cosmetics, housewares, etc.). Create a program whi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

In C++ choose a type of product to sell (food, apparel, electronics, cosmetics, housewares, etc.). Create a program whi

Post by answerhappygod »

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().
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply