What are the benefits of OOPs?
OOPs stands for object-oriented programming, which deals with objects and data, rather than actions and logic. It is a subset of Procedure Oriented Programming language, however it has certain benefits over it, such as:
- Code Reusability: code can easily be reused
- Inheritance: Eliminates redundant code and extends the use of existing classes
- Encapsulation: Data and functions can be hid in one class from another
- Easy Maintenance
- Easy to upgrade
- Polymorphism: Different methods can have the same name but different behaviors.
- Abstraction: Common definition of a base class that multiple derived classes can share