| 1. |
What are advantages and disadvantages of object oriented programming? Explain. |
|
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: 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: 3. Speed: |
|