Question: CODE C++ Given the following hierarchy, show (pseudo) code to print all elements of a polymorphic container. (Don't forget to show the declaration of the
CODE C++

Given the following hierarchy, show (pseudo) code to print all elements of a polymorphic container. (Don't forget to show the declaration of the container.) class Shape { public: virtual void print(ostream & os) cons t = 0;}; class Circle: public Shape { public: void print(ostreara & os) const;}: class Square: public Shape { public: void print(ostream & os) const:}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
