1 2 3 4 5 6 7 8 9 10 11 12

Object Oriented Programming

For a language to be object-oriented it must at least include the following three capabilities

Encapsulation
The ability to define a new type and a set of operations on that type, without revealing the representation of the type. C++ classes support encapsulation by restricting access to private data members.

Inheritance
The ability to create new types that inherit properties from existing types. C++ support inheritance through a mechanism known as class derivation.

Polymorphism
The ability of objects that belong to related classes to respond differently to the same operation. In C++ virtual functionssupport polymorphism.

Thus we now need to look at class derivation and virtual functions.

March 11, 1998

Page 9

C201/TAM