data abstraction encapsulation objectobject is an entity that has state and behavior it may be anything it may be physical and logical for examplemousekeyboardchairtablepen etc classclass can be defined as collection of objects it is logical entity that has some specific attributes and methods inheritanceinheritance is feature of object-oriented programming it specifies that one object acquires all the properties and behaviors of parent object by using inheritance you can define new class with little or no changes to the existing class the new class is known as derived class or child class and from which it inherits the properties is alled base class or parent class it provides re-usability of the code polymorphismpolymorphism is made by two words "polyand "morphspoly means many and morphs means formshape it defines that one task can be performed in different ways for exampleyou have class animal and all animals talk but they talk differently herethe "talkbehavior is polymorphic in the sense and totally depends on the animal sothe abstract "animalconcept does not actually "talk"but specific animals (like dogs and catshave concrete implementation of the action "talkencapsulationencapsulation is also the feature of object-oriented programming it is used to restrict access to methods and variables in encapsulationcode and data are wrapped together within single unit from being modified by accident data abstractiondata abstraction and encapsulation both are often used as synonyms both are nearly synonym because data abstraction is achieved through encapsulation abstraction is used to hide internal details and show only functionalities abstracting something means to give names to thingsso that the name captures the core of what function or whole program does