Advertisements
Advertisements
प्रश्न
State any six principle advantages of object oriented programming.
दीर्घउत्तर
Advertisements
उत्तर
Advantages of Object-Oriented Programming are as follows:
- Encapsulation/data hiding: It bundles data and methods together and uses access modifiers (like private/public) to protect data.
- Modularity: By breaking a program into autonomous objects, it becomes easier to manage and troubleshoot.
- Reusability (Inheritance): Inheritance allows you to use existing code as a base for new features without rewriting everything.
- Polymorphism: It allows different classes to be treated through the same interface, making the code more flexible.
- Maintainability: Because code is modular and encapsulated, fixing a bug in one “object” is less likely to break the rest of the system.
- Abstraction: It focuses on what an object does rather than how it does it, simplifying the user’s interaction with the code.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2023-2024 (July) Official Board Paper
