Object Oriented Design

What is object?

Run time entity of a class is called object. The object represents class as a whole. Object is the instance for any given class. To access the data members of the class an object must be declared. The object is a real world entity that can manage them. Objects are nondependent and enclose all the required information. Message passing is the only way through which objects can communicate. The objects follow both sequential as well as parallel execution.

What is object oriented design?

It is a system exclusively designed for resolving software related issues. OOD consists of connected objects that help in resolving software problems. Object oriented design is a concept which forces the developers to code a program with better flow. The OOD consists of five basic concepts with which object oriented designing is based on.

They 5 basic concepts are as follows:

  1. Encapsulation
  2. Data protection
  3. Inheritance
  4. Interface
  5. Polymorphism


Literal meaning of encapsulation means binding or wrapping up. Encapsulation means enclosing one thing into another thing so that the inner one is no longer visible. It is binding together of data members and member functions so as to hide data. This concept is applied to protect data from outside interference. Encapsulation is a fundamental principle of data protection.

Data Protection

Data is an important entity, unfair usage of which can create issues. This concept is used to hide internal data. This can be done by declaring data member and member functions under protected privacy mode. By this process the member functions and data members will not be accessible to all the class but only the class in which they are declared as well as the classes which permitted for the same.


Inheritance literally means property passing to the heirs. In computers it means sharing of the data members and member functions with the derived class. The class from which the data members and member functions are derived is called base class or parent class and the new inherited class is class is called derived class or child class. This concept allows the access of data member and member function in other classes though they have been declared in protected mode.


An interface is a platform that allows two devices or two systems to interact. It is reference type like class and is used in java programming language. The interface contains abstract methods, static methods, constants and nested types.


Poly means many and morphism means shapes, so polymorphism means something that has many shapes. It is most one of the important traits of object oriented programming structures. Because of this concept classes and functions can be defined with the same name. For this we need to create multiple classes and implement auto-load magic function. Polymorphism is of two types: run time polymorphism and compile type polymorphism.