Question: Using your Games class, create an array of Games objects on the heap (three for the SIZE) and then pass the pointer that points to

Using your Games class, create an array of Games objects on the heap (three for

the SIZE) and then pass the pointer that points to that array to a function that

loads it up with the same info from part A. Print the arrays values using the

pointer. Make sure the program properly uses the accessors and mutators. When

completed the program should cleanup.

//This is my Games class

class Games { private: string gameName, gameType; float gameCost; public: //constructor to initialize all three data members Games(string gName, string gType, float gCost): gameName(gName), gameType(gType), gameCost(gCost){}

//Get methods for each data members to get values of each data member string getGameName() { return gameName; } string getGameType() { return gameType; } float getGameCost() { return gameCost; }

//Set methods for each data members to change values of each data member void setGameName(string gName) { gameName = gName; } void setGameType(string gType) { gameType = gType; } void setGameCost(float gCost) { gameCost = gCost; } };

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 Databases Questions!