Explain the advantages of OOPs with the examples.

Showing Answers 1 - 39 of 39 Answers

madhusudhanreddy.thotli

  • Nov 15th, 2006
 

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

Regards

Madhu

  Was this answer useful?  Yes

DotNetGuts

  • Nov 17th, 2006
 

OOPs Concepts comes into picture due to following reasons.

  1. Man can easily understand the concept of object and class as they are based on real-life scenario.
  2. Maintenance of project becomes easy, as minor change in business rule require little modification rather than change in whole project.
  3. Reusability of Code through Inheritance.

DotNetGuts

http://www.DotNetGuts.blogspot.com

  Was this answer useful?  Yes

Ranjit

  • Nov 28th, 2006
 

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.

ravi

  • Jan 3rd, 2007
 

Advantages of OOPS

 a) Robust and Secure

 b) allows to Reusability

          1)Inheritence 

          2) polymorphism

c) allows maintainability

d) allows Reusability

e) allows communication between object to object

  Was this answer useful?  Yes

sheetalkamthe

  • Mar 20th, 2007
 

Inheritance is the main advantage in which one class aquires properties of another class

  Was this answer useful?  Yes

just4u4023

  • May 10th, 2008
 

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

  Was this answer useful?  Yes

omkar yadav

  • May 29th, 2012
 

1. Testability/Increased Quality (automated testing can increase speed of testing and increase quality)
2. Code re-use (Polymorphism, Generics, Interfaces)
3. Code extensibility
4. Catch errors at compile time rather than at runtime.
5. Maintainability: If designed correctly, any tier of the application can be replaced by another that implements the correct interface(s), and the application will still work (can use multiple user interfaces, can swap out data providers, etc.).
6. Reduces large problems to smaller, more manageable ones.
7. Fits the way the real world works. It is easy to map a real world problem to a solution in OO code.


Read more: http://wiki.answers.com/Q/Benefits_of_object_oriented_programming#ixzz1wJbwjMws

  Was this answer useful?  Yes

It is good because it is totally based on objects. It provides the concept of inheritance, encapsulation, polymorphism. With the help of this concepts the code is reusable, get in many forms. Classes support encapsulation.

  Was this answer useful?  Yes

rajanish jha

  • Oct 8th, 2012
 

The main advantage is that it uses real world object and generic programming approach

  Was this answer useful?  Yes

prasad kulkarni

  • Jul 21st, 2016
 

OOPs allows us to decompose a problem into number of entities called Objects & then builds data and functions around those entities.  Followings are the examples of OOPS (Object oriented programming)

1) Simplicity
2) Modularity
3) Inheritance
4) Polymorphism
5) Data Abstraction
6) Data Hiding & Encapsulation

  Was this answer useful?  Yes

sabari

  • Nov 18th, 2016
 

Code reuse
Reduce lines of coding

  Was this answer useful?  Yes

nimesh diyora

  • Feb 11th, 2017
 

Code Reuse and Recycling: Objects created for Object Oriented Programs can easily be reused in other programs.

Encapsulation (Part 1): Once an Object is created, knowledge of its implementation is not necessary for its use. In older programs, coders needed understand the details of a piece of code before using it (in this or another program).

Encapsulation (Part 2): Objects have the ability to hide certain parts of themselves from programmers. This prevents programmers from tampering with values they should not. Additionally, the object controls how one interacts with it, preventing other kinds of errors. For example, a programmer (or another program) cannot set the width of a window to -400.

Design Benefits: Large programs are very difficult to write. Object Oriented Programs force designers to go through an extensive planning phase, which makes for better designs with less flaws. In addition, once a program reaches a certain size, Object Oriented Programs are actually easier to program than non-Object Oriented ones.

Software Maintenance: Programs are not disposable. Legacy code must be dealt with on a daily basis, either to be improved upon (for a new version of an exist piece of software) or made to work with newer computers and software. An Object Oriented Program is much easier to modify and maintain than a non-Object Oriented Program. So although a lot of work is spent before the program is written, less work is needed to maintain it over time.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions