What are the advantages of inheritance?

Answer Posted / awais zahur

inheritance has two main advantages:
1.extendability
we can extend the already made classes by adding some new
features.
2.maintainability
it is easy to debug a program when divided in parts.
inheritance provides an opportunity to capture the problem

Is This Answer Correct ?    80 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is polymorphism used?

586


Can a varargs method be overloaded?

617


what are the different types of qualifier in java?

1843


What is coupling in oops?

598


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1622






What is solid in oops?

612


is there any choice in opting subjects like 4 out of 7

1731


Why interface is used?

555


Can you inherit a private class?

633


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?

1408


What is abstract class in oops?

600


What is inheritance in oop?

604


What does no cap mean?

592


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1459


write knight tour problem which is present in datastructure

2167