Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ please In this assignment, you will create a program that stores a representation of each item in a collection. You decide what kind of
c++ please
In this assignment, you will create a program that stores a representation of each item in a collection. You decide what kind of items will be stored in your treasure chest: books, DVDs, knitting needles, model cars, wine corks, etc. Pick something that interests you. Next, decide what attributes each item will have: weight, color, number of pages, length, runtime in minutes, number of wheels, etc. You should pick at least 4 attributes, one of which is the item's value (in units of your choice). The objects are stored in a treasure chest that your program will represent with a dynamically allocated two-dimensional array. The program begins by prompting the user for the desired size of the treasure chest. The program will provide a menu that allows the user to: 1. Add an item: prompt the user for a row and column, then prompt the user for the value of each attribute for the item. Store the item's data at the appropriate place in the array. 2. Remove an item: prompt the user for a row and column; if an item is present, remove it (reset attributes to initial/empty values). 3. Generate a random item: prompt the user for a row and column and create a new item with randomly chosen values for its attributes. 4. Show an individual item: prompt the user for a row and column, then output the data stored for that item (its attributes). 5.
Step 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