Computer Science, asked by raj1817, 1 year ago

Name any three main feature of object-oriented programming?explain them.

Answers

Answered by maha86
6
i know the answer for this very well
but I kept my book in class
i wil send to you later
Answered by Radhikapatel18
9
There are three major features in object-oriented programming: encapsulation, inheritance and polymorphism.

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."

Inheritance Passes "Knowledge" Down

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, then only the processing and data associated with that unique step needs to be added. Everything else about that step is inherited. The ability to reuse existing objects is considered a major advantage of object technology.

Polymorphism Takes any Shape

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.

Radhikapatel18: please mark it as brainliest
raj1817: Very long answer
raj1817: Short hai
Similar questions