Inheritance, Polymorphism, and Encapsulation


Inheritance, polymorphism, and encapsulation comprise the three central characteristics of object-oriented (OO) programming. Inheritance allows you to create class hierarchies, where a base class gives its behavior and attributes to a derived class. You are then free to modify or extend its functionality. Polymorphism ensures that the proper method will be executed based on the calling object’s type. Encapsulation allows you to control access to your object’s state, while making it easier to maintain or change your implementation at a later date.


Base Class Instance Reference Public Class Developer Class Single Inheritance 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Guy Fouché and Trey Nash 2007

Personalised recommendations