Question: Make an InstanceCounter class a . Make a global variable to count the number of times an object was instantiated. Make another global variable to

Make an InstanceCounter class
a. Make a global variable to count the number of times an object was instantiated. Make another global variable to count the number of an object was deleted.
b. Make a new class named InstanceCounter. In its constructor, increment the number of times an object was instantiated. In its destructor, increment the number of times an object was deleted.
c. Add a function that prints these values:
(The autograder will look for the substrings "instantiated: and "deleted: ", so don't change those.)
d. Add a menu option to your program to report the number of instantiations and deletions:
cout "11. Memory report" endij When this option is selected, call that function to report the number of instantiations and deletions
e. Make your LinkedList class inherit from InstanceCounter.
f. Make your LinkedListNode classes inherit from InstanceCounter.
Make your CharMap class inherit from InstanceCounter.
h. Make your Dataset class inherit from InstanceCounter:
Make an InstanceCounter class a . Make a global

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!