what are the features of object oriented programming
Answers
Explanation:
The features of oops are
1. Encapsulation
Encapsulation refers to the creation of self-contained modules that bind processing functions to the data. These user-defined data types are called "classes," and one instance of a class is an "object." For example, in a payroll system, a class could be Manager, and Pat and Jan could be two instances (two objects) of the Manager class. Encapsulation ensures good code modularity, which keeps routines separate and less prone to conflict with each other.
2. Inheritance
Classes are created in hierarchies, and inheritance allows the structure and methods in one class to be passed down the hierarchy. That means less programming is required when adding functions to complex systems. If a step is added at the bottom of a hierarchy, only the processing and data associated with that unique step needs to be added. Everything else is inherited. The ability to reuse existing objects is considered a major advantage of object technology.
3. Polymorphism (many forms)
Object-oriented programming allows procedures about objects to be created whose exact type is not known until runtime. For example, a screen cursor may change its shape from an arrow to a line depending on the program mode. The routine to move the cursor on screen in response to mouse movement would be written for "cursor," and polymorphism allows that cursor to take on whatever shape is required at runtime. It also allows new shapes to be easily integrated.
Features of object oriented programming are :-
- It give stress on the data items rather than functions.
- It makes the complete program/problem simpler by dividing it into a number of objects.
- The objects can be used as a bridge to have data flow from one function to another.
- You can easily modify the data without any change in the function.
Hope it helps you....
mark as brainliest plzz ❤️❤️