Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior.
The organization of an object-oriented program also makes the method beneficial to collaborative development, where projects are divided into groups.
Principles of OOP
Object-oriented programming is based on the following principles:
- Encapsulation. The implementation and state of each object are privately held inside a defined boundary, or class. Other objects do not have access to this class or the authority to make changes but are only able to call a list of public functions, or methods. This characteristic of data hiding provides greater program security and avoids unintended data corruption
- Abstraction: Objects only reveal internal mechanisms that are relevant for the use of other objects, hiding any unnecessary implementation code. This concept helps developers more easily make changes and additions over time.
- Inheritance: Relationships and subclasses between objects can be assigned, allowing developers to reuse a common logic while still maintaining a unique hierarchy. This property of OOP forces a more thorough data analysis, reduces development time and ensures a higher level of accuracy.
- Polymorphism: Objects can take on more than one form depending on the context. The program will determine which meaning or usage is necessary for each execution of that object, cutting down the need to duplicate code.
0 टिप्पणियाँ:
Post a Comment