+2 votes
in Class 12 by kratos

What are advantages and disadvantages of object oriented programming? Explain.

1 Answer

+4 votes
by kratos
 
Best answer

The advantages of object oriented programming:

  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.

The disadvantages of object oriented programming:
1. Size:

Object Oriented programs are much larger than other programs. In the early days of computing, space on hard drives, floppy drives and in memory was at a premium. Today we do not have these restrictions.

2. Effort:
Object Oriented programs require a lot of work to create. Specifically, a great deal of planning goes into an object oriented program well before a single piece of code is ever written. Initially, this early effort was felt by many to be a waste of time. In addition, because the programs were larger (see above) coders spent more time actually writing the program.

3. Speed:
Object Oriented programs are slower than other programs, partially because of their size. Other aspects of Object Oriented Programs also demand more system resources, thus slowing the program down.

...