What are the advantages of inheritance?

Answer Posted / axuu

Inheritance offers the following advantages --

Developement model closer to real life object model with
hierarchical relationships
Reusability -- facility to use public methods of base class
without rewriting the same
Extensibility -- extending the base class logic as per
business logic of the derived class
Data hiding -- base class can decide to keep some data
private so that it cannot be altered by the derived class

Is This Answer Correct ?    32 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is byval and byref? What are differences between them?

1792


What is abstraction example?

699


Why do pointers exist?

757


What is solid in oops?

706


What is destructor in oop?

699






Is abstract thinking intelligence?

687


What is object and example?

702


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1489


How can you overcome the diamond problem in inheritance?

863


What are properties in oop?

695


How do you use inheritance in unity?

680


What is constructor in oop?

691


What is the main feature of oop?

750


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

2040


what's the basic's in dot net

1815