By using pure virtual function, abstract class and interface,create a simple “shape” hierarchy: a base class called Shape and derived classes called Circle, Square, and Triangle. In the base class, make a virtual function called draw( ), and override this in the derived classes. Make a pointer of Shape and objects of derived class and call draw( ) through the base-class pointers, to verify the behavior of the virtual function.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here