Object-Oriented Programming has the following advantages over conventional approaches:
OOP provides a clear modular structure for programs which makes it good for defining abstract datatypes where implementation details are hidden and the unit has a clearly defined interface.
OOP makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones.
OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. This is particularly useful for developing graphical user interfaces.
Above answer was rated as good by the following members: nagasrinukadali
RE: Explain the advantages of OOPs with the examples.
Hello All
The main advantage of using OOPs is that it supports Inheritance.Inheritance is the process of acquiring the properties and methods from one entity to another entity
RE: Explain the advantages of OOPs with the examples.
Advantages of OOP
Object-Oriented Programming has the following advantages over conventional approaches:
OOP provides a clear modular structure for programs which makes it good for defining abstract datatypes where implementation details are hidden and the unit has a clearly defined interface.
OOP makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones.
OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. This is particularly useful for developing graphical user interfaces.
RE: Explain the advantages of OOPs with the examples.
Well! the main advantage of OOPs is that it uses the concept of classes and object. which differs it totally from the POP. Due to uses of classes it becomes more easy to divide a large program into smaller modules which can be treated separately. The other advantage of OOP is security. Data can be protected using access specifiers like PUBLIC PRIVATE AND PROTECTED. No outside function can access the private function.
2. the other advantage is use of inheritance. through which we can use the features of one class into another class. Mainly sub class or derived class acquire the features of parent class or base class. the best example of inheritance is
GRANDFATHER----->>>>FATHER-------->>>>>SON here FATHER acquires some features of GRANDFATHER and SON acquires the features of both FATHER and GRANDFATHER.
3 Polymorphism is the other advantages of OOPs which simply means one name many forms. There can be a one function which has different forms depending upon input or arguments.
4. Friend function is also another advantage which are used to access private function