Question: Assume the following two classes are defined: class Grocery private: string description; int price; public: Grocery (string description, int price); ; class Trolley private: Grocery

Assume the following two classes are defined: class Grocery private: string description; int price; public: Grocery (string description, int price); ; class Trolley private: Grocery ** groceries; // dynamic 10 array of dynamic Grocery objects int capacity; // size of the array int numItems; // number of items in the array public: Trolley (int capacity = 10); // default array size: 10 -Trolley(); // destructor void clearTrolley(); // remove all groceries }; Implement the copy constructor for the Trolley class
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
