Inheritance
-
Inheritance diagrams arrows go up!
- the constructor is the thing that defines all the base things that other functions will define in their house
Virtual functions
-
What is it
-
A function to do run-time polymorphic behaviour
-
Efficiency and efficacy
-
virtual functions are less efficient as static functions
-
to invoke a virtual function we
- base-class pointer to a derived-class object (shapeptr->draw())
- or shpaeptr.draw();
Polymorphism
-
ITS a WAY TO ASSOCIATE MANY MEANING TO METHOD NAME
Encapsulation