Before going into the details of “object oriented programming” let us understand very basic fundamental. look at these three word “object”,”oriented” and “programming”. But should we start learning “OBJECT” concept or do we need something else?. Yes before going into the details of objcet we should consider about “CLASS”.  The world need this word because it provides  a name of related objects. There are so many types of fruits in this world like apple,mango,banana etc. but these all are fruit. so fruit is class and mango is one of object of fruit.

“A class is not an Object. A class is blue print of an object”

C++ is object oriented programming. object consists of data and method that operate on the data. This is the basic unit of object oriented programming.


  1. Data Hiding(Abstraction) and Encapsulation
  2. Dynamic Binding
  3. Message Passing
  4. Inheritance
  5. Polymorphism


Combining data and function in single unit is called encapsulation. ex.

class  Addition {
   int a;
   int b;
    void add( int a,int b);

Here Addition is a class.,a,b is data and void add(int a, int b) is function. The class Addition is encapsulating data and function. so class is providing a way of encapsulation in object oriented programming.


Data is not accessible from the outside world and only those function which are present in the class can access the data. The insulation of the data from direct access by the program is called data hiding or information hiding. Hiding the complexity of proram is called Abstraction and only essential features are represented.


Resolving function at runtime is called dynamic binding.


The process by which one object can interact with other object is called message passing.


In object oriented programing inheritance is mechanism of  extending a class. it creates a new class called derived class from base class. The derived class inherits all the properties of base class. it can modifies some of features of base class or may add new features.


Polymorphism is an ability to take more than one form. In object oriented programming.

Related Contents to follow