Monday, April 30, 2007

What is Object Oriented Programming(OOP) ?

As its name indicates , it is a technique which is organised around object.Hence object is CYNOSURE here.Here main focus point is data. Functions are secondary. In very simple terms, functions are data oriented , means in what way data is going to be used in program that is described in function. so data and functions are tied together to make "Object".

Features of OOPs:

Abstraction
Encapsulation
Inheritance
Polymorphism

Abstraction:
Abstraction is the process of hiding the details and exposing only the essential features of a object according to the context or problem domain.

IEEE Definition :
"A view of a problem that extracts the essential information
relevant to a particular purpose and ignores the remainder of
the information."

-- [IEEE, 1983]


Encapsulation:
Encapsulation is the ability to bundle related data and functionality within a single, autonomous entity called a class.

Inheritance:
Inheritance is a mechanism to create new classes through already existing classes.

Polymorphism:
Poly means "many" morphism means "forms" hence verbal meaning is many forms. It is a way in which one name can provide different functionalities.
-> the ability to provide the same interface to objects with differing implementations.