Notes – Difference Between Procedural Oriented and Object Oriented Programming in C++

Understanding these three programming approaches is important to grasp how C++ evolved and how it works.

1. Procedural Oriented Programming (POP)

This is the traditional approach to programming.

  • Follows a step-by-step structure.
  • Programs are divided into functions.
  • Focus is on procedure (what to do).
  • Data is shared among functions.
  • Less secure as data can be accessed globally.

Example Languages: C, Pascal


2. Object Oriented Programming (OOP)

This is the modern approach used in C++, Java, Python (partially), etc.

  • Program is divided into objects (real-world entities).
  • Focus is on data (how to protect and use it).
  • Promotes encapsulation, inheritance, and polymorphism.
  • Better security: data and functions are tied together in a class.

Example Languages: C++, Java, Python (partially)


3. Object Based Programming (OBP)

  • Similar to OOP but does not support inheritance or polymorphism.
  • Supports object and class, but not full OOP features.
  • Useful for simpler applications.

Example Language: JavaScript (traditionally), VBScript


Tabular Comparison


FeatureProcedural (POP)Object Oriented (OOP)Object Based (OBP)
Divided IntoFunctionsObjects/ClassesObjects/Classes
FocusProcedureDataData
Data SecurityLowHighModerate
Inheritance SupportNoYesNo
PolymorphismNoYesNo
ReusabilityLowHighMedium
Real-life ModelingDifficultEasyPartial
Example LanguageCC++, JavaJavaScript