+1 vote
in Class 12 by kratos

Explain the advantages of OOP.

1 Answer

+4 votes
by kratos
 
Best answer

The advantages of OOP are:

  1. OOP provides a clear modular structure for programs. Large problems can be reduced to smaller and more manageable problems.

  2. In OOP, data can be made private to a class such that only member functions of the class can access the data. This principle of data hiding helps the programmer to build a secure program.

  3. Implementation details are hidden from other modules and other modules has a clearly defined interface.

  4. It is easy to maintain and modify existing code as new objects can be created with small differences to existing ones.

  5. With the help of polymorphism, the same function or same operator can be used different purposes. This helps to manage software complexity easily.

  6. In OOP, programmer not only defines data types but also deals with operations applied for data structures.

  7. It is easy to model a real system as real objects are represented by programming objects in OOP.

  8. With the help of inheritance, we can reuse the existing class to derive a new class such that the repetition of code is eliminated and the use of existing class is extended. This saves time and cost of program.

...