What is Object-Oriented Programming?
The OOP paradigm and its four pillars.
What is Object-Oriented Programming?
A programming paradigm based on objects and classes. OOP organises software around data (objects) rather than functions and logic. In JavaScript, classes provide a clean syntax to define objects with shared behaviour.
| Pillar | Meaning |
|---|---|
| Encapsulation | Bundle data and methods into a single class unit. |
| Inheritance | Child classes extend parent class properties/methods. |
| Polymorphism | Same interface, different behaviour per object type. |
| Abstraction | Hide complexity; expose only what is necessary. |
Activity — complete the code
Complete the code correctly to mark this lesson as complete automatically.
Name the four pillars of object-oriented programming.
// OOP pillars// : bundle data and methods into one unit// : child classes extend parent classes// : same interface, different behaviour// : hide complexity, expose only what is needed