let us understand each of the pillars of object-oriented programming in briefencapsulation this property hides unnecessary details and makes it easier to manage the program structure each object' implementation and state are hidden behind well-defined boundaries and that provides clean and simple interface for working with them one way to accomplish this is by making the data private inheritance inheritancealso called generalizationallows us to capture hierarchal relationship between classes and objects for instancea 'fruitis generalization of 'orangeinheritance is very useful from code reuse perspective abstraction this property allows us to hide the details and expose only the essential features of concept or object for examplea person driving scooter knows that on pressing hornsound is emittedbut he has no idea about how the sound is actually generated on pressing the horn polymorphism poly-morphism means many forms that isa thing or action is present in different forms or ways one good example of polymorphism is constructor overloading in classes