Question d’entretien chez Infosys

oops 4 pillars with real world example

Réponse à la question d'entretien

Utilisateur anonyme

26 déc. 2025

The four pillars of OOP (Object-Oriented Programming) are Abstraction, Encapsulation, Inheritance, and Polymorphism, demonstrated by a real-world Vehicle (like a Car): you abstract (use pedals/wheel without knowing engine), encapsulate (engine parts hidden inside), inherit (Car inherits from Vehicle), and use polymorphism (different vehicles "move" differently).