What is object-oriented programming (OOP)?

Object-oriented programming in short OOP (Not Oops!) is one of the main components of programming that follows the concept of “objects”. An object is nothing more than a collection or small piece of information that is treated as a regular entity with both state (property or attribute) and behavior.

A good example of an object is a Car that has attributes Like – Color, Size, Capacity, Weight, etc… A car has behavior denoted by its methods Like – Start the engine, Accelerate, Turn Left/Right, etc…



We also follow the same concept in programming to break down a problem into small entities and then build data and functions around these entities.

Why do we need OOP?

To understand the need for OOP, you first need to understand what it has replaced. The early programming languages are procedural-oriented programming (POP), and the programmer defines a very specific set of steps that the computer will perform. A procedural approach works well for smaller applications, but as the size of the application increases, this approach makes it very difficult to maintain large and complex applications. OOP eliminates this type of flaws and improves programs efficiency and maintainability.

Benefits of OOP?

Following are the benefits of the object-oriented programming paradigm –

  1. Code reusability and recycling
  2. Improved development speed and maintainability
  3. Higher quality software
  4. Lower cost of the development cycle
  5. Easy to understand
  6. Encapsulation
  7. etc..

Difference between POP and OOP

Following are the major difference between procedural-oriented programming and object-oriented programming –

POPOOP
The program is divided into small parts called functions.The program is divided into small parts called objects.
Follows the Top-Down approach.Follows the Bottom-Up approach.
No special way to hide data that’s why it is less secure.Provides data hiding feature that’s why it is more secure.
Reusability of code is very less.Reusability of code is very high.
No access specifiers availableProvides access specifiers (Private, Protected, Public)
Data can move freely from function to function in the system.Objects can move and communicate with each other through member functions.
Difficult to add/implement a new feature.Very much easy to add/implement a new feature.
Overloading is not possible.Overloading is possible in the form of Function and Operator overloading.
C, VB, FORTRAN, Pascal are examples of POP language.C++, Java, VB.NET, C#.NET are examples of OOP language.

Concept of OOP

Now you understood what is OOP and how it is important and better than the POP. Following are the major concepts you need to focus to understand OOP paradigm, we will see each of them with real-life examples in next tutorials-

  1. Class
  2. Object
  3. Inheritance
  4. Encapsulation
  5. Abstraction
  6. Polymorphism