| Introduction
In traditional procedural programming, a program is composed of data and a bunch of procedures,
each of which carries out a subtask for data-processing. Object-oriented programming or OOP, however,
breaks down this architecture and intertwined relatively-independent pieces of data
and the methods manipulating them together. The new construct is called an object.
As shown in the figure above, an object is composed of data (varibles) and code manipulating
these data (methods).
OOP Features
OOP has three important features: inheritance, encapsulation, and polymorphism.
Inheritance means that an object can inherit from another object, thereby owning all the
public data and methods from the parent object. Encapsulation means an obje...[more] |
|