safish.com

home of a small fish

01 August 2001 at 00:00
Abstraction
The process of modelling real-world objects. When you create a class you create an abstraction of a real-world object (like a dictionary definition of that real-world object).

Encapsulation
The property of being a self-contained unit is called encapsulation. With encapsulation, we can accomplish data hiding. Data hiding is the highly valued characteristic that an object can be used without the user knowing or caring how it works internally. Just as you can use a refrigerator without knowing how the compressor works, you can use a well-designed object without knowing about its internal data members.

Inheritance
When an object is derived from another object. It inherits all the properties etc. of the parent object, but can also add to them as needed.

Polymorphism
Different objects do "the right thing" through what is called function polymorphism and class polymorphism. Poly means many, and morph means form. Polymorphism refers to the process whereby an object invokes a method of another object in a common manner (with the same name) without understanding or caring how it is accomplished.