Notes – Object Based vs Object Oriented Programming Language

Both Object-Oriented and Object-Based languages use the concept of objects, but they differ in features and capabilities.

Letโ€™s break this down in a simple way.


Object-Oriented Programming Language (OOP)

  • Fully supports objects and classes.
  • Implements all four OOP principles:
    • Encapsulation
    • Inheritance
    • Polymorphism
    • Abstraction
  • Example: Java, C++, Python, C#

Java Example:

class Animal {
void sound() {
System.out.println("Makes sound");
}
}

Object-Based Programming Language

  • Supports objects, but does not support all OOP features (mainly inheritance and polymorphism).
  • Limited version of OOP.
  • Focuses only on encapsulation using objects.
  • Example: JavaScript (before ES6), VBScript

JavaScript Example:

let car = {
brand: "Toyota",
drive: function() {
console.log("Car is moving");
}
};

Key Differences: Comparison Table


FeatureObject-Oriented (OOP)Object-Based
Supports InheritanceYesNo
Supports PolymorphismYesNo
Supports AbstractionYesLimited or No
Class-basedYes (e.g., Java)No classes (older JS)
ExamplesJava, C++, PythonJavaScript (old), VBScript
Object UsageFull-fledged OOP objectsBasic object structures