Main Features of OOPs

Object Oriented Programming mainly comprises of the below four features, Main Features of OOPs

Inheritance:- Inheritance is the technique in which one class inherits the attributes and methods of another class. The capability of a class to derive properties and characteristics from another class is called Inheritance. Inheritance is one of the most important feature of Object Oriented Programming.

Encapsulation:- A class is a program-code-template that allows developers to create an object that has both variables (data) and behaviors (functions or methods). A class is an example of encapsulation in computer science in that it consists of data and methods that have been bundled into a single unit.

Polymorphism:- polymorphism is the method in an object-oriented programming language that does different things depending on the class of the object. For example, $square->area() will return the area of a square, but $triangle->area() might return the area of a triangle. Polymorphism is a property through which any message can be sent to objects of multiple classes, and every object has the tendency to respond in an appropriate way depending on the class properties.

Data Abstraction:- Data abstraction refers to providing only essential information about the data to the outside world, hiding the background details or implementation.

Main Features of OOPsexpoundsofttechsolution