Question: Question: C++ Define A Class Named Inventory With These Member Variables: - Retailer: A String That Is Used To Store The Name Of Retailer A

Question:C++ Define A Class Named Inventory With These Member Variables: - Retailer: A String That Is Used To Store The Name Of Retailer

A function named display (to display all available items and their prices), this function has no input argument There is no need for any other member function such as removing or sorting items. Write a test main function that adds 3 items and displays available items at the store. A function named add which adds an item A destructor to free allocated memory for itemNames and prices A constructor that accepts: retailer, and capacity. It set numItems=0 and allocates memory for itemNames and prices Default constructor that sets: retailer=Walmart, capacity=100, numItems=0 and allocates memory for itemNames and prices 1 mutator functions (for retailer) 3 accessor functions (for the first three member variables) C++ Define a class named Inventory with these member variables: - retailer: a string that is used to store the name of retailer (such as Walmart) - capacity: maximum number of items (an integer) - numItems: actual number of items (an integer) - itemNames: a pointer to string (which is used for an array with names of the items sold at the retailer) - prices: A pointer to Money (which is used to create an array of prices of the items sold at the retailer) Member functions include:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!