Basic Terms Used in OOP

(1) Data Abstraction:
Data abstraction refers to the process of providing only essential information to the outside word and hiding their background details. Thus only that information is represented that is needed without explaining the details.
For Example consider a TV in which you can turn on and off, change the channel, adjust the volume, and add external components such as speakers, VCRs, and DVD players BUT you do not know it's internal detail that is, you do not know how it receives signals over the air or through a cable, how it translates them, and finally displays them on the screen.
Thus we can say, a television clearly separates its internal implementation from its external interface and you can play with its interfaces like the power button, channel changer, and volume control without having zero knowledge of its internals.
Now if we talk in terms of C++ Programming, C++ classes provides great level of data abstraction. They provide sufficient public methods to the outside world to play with the functionality of the object and to manipulate object data ie. State without actually knowing how class has been implemented internally.
(2) Data Encapsulation:
The process of binding data and its associated function into a single unit is known as data encapsulation.
Thus the data can be accessed only by the function that is bind with it. It can not be accessed outside the world.
Thus Data Encapsulation provides data hiding facility.

(3) Inheritance:
The process of deriving a new class called the derived class from already existing class is known as inheritance.
It provides the concept of reusability. I.e. we can add new features to the existing class without modifying it.
There are various types of inheritance:
(1) Single
(2) Multiple
(3) Multilevel
(4) Hybrid
(5) Hierarchical
(4) Polymorphism:
The process of using same thing for different purpose is known as polymorphism.
It simply means one name multiple forms.
Two types of polymorphism:
(A)Compile time Polymorphism: Function overloading and operator overloading is example of compile time polymorphism
(B)Run time Polymorphism: Virtual function is an example of runtime polymorphism.
(5) Dynamic Binding:
Binding means to link a function call with function definition. Binding can be of two types:
(a) static binding
(b) dynamic binding
If compiler decides which function call to be link with which function definition at compile time then it is called static binding. Function overloading and Operator overloading is the example of static binding.
If compiler decides which function call to be link with which function definition at run time then it is called dynamic binding. Virtual function is the example of dynamic binding.
(6) Message Passing:
In Object Oriented Programming the objects communicate with each other by sending and receiving message to each another.
An object can pass message in the following form: Object_Name. Function_Name (Argument List);
Test T1;
T1.input (a);
T1 is the object.
Input is a message.
a is the information.

Download Projects

Download Programs