Question: c++ code only 9.3 Design a hierarchy of classes in which each class contains a virtual destructor. Design the main() function that dynamically allocates and
9.3 Design a hierarchy of classes in which each class contains a virtual destructor. Design the main() function that dynamically allocates and destroys an object(s) of each class. A base class pointer should be used when dynamically allocating the derived class object(s). The output produced by the program should indicate which destructor is invoked when a specific object is deleted (destroyed)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
