Every real-world entity is treated as an object in OOPS!

Object

A class can be stated as the blueprint of the object. It states what an object can do.

CLass

InHERITANCE

Inheritance is a process in which new classes are created from the existing classes. Inherited class will have all features of parent class from which it is derived.

Types of Inheritance

1. Single inheritance 2. Multilevel inheritance 3. Multiple inheritance 4. Hierarchical inheritance 5. Hybrid inheritance

In polymorphism, an object or method takes more than one form. It has meaning ‘poly’ – many, ‘morph’ – forms.

POLYMORPHISM

Types of Polymorphism

1. Compile-time Polymorphism

2. Runtime Polymorphism

This type of polymorphism is achieved by method overloading or operator overloading.

This type of polymorphism is achieved by method overriding.

Abstraction is the process of hiding information at the idea level. At the time of design, we decide on implementations to be hidden and create abstract classes, methods, and properties. 

Abstraction

It decides what is to be there for end user without thinking about how is it going to be implemented.

Car User: Thinking about the necessary features and functionalities of the car.

Engineer: Thinking about the internal implementation of the necessary features and functionalities of the car.

Encapsulation refers to the bundling of data, along with the methods that operate on that data, into a single unit or class.

EnCapsulation

Car

Encapsulation can also refer to a mechanism that restricts direct access to certain components of an object so that users cannot access the state values ​​of all variables of a given object.