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
How can you overcome the diamond problem in inheritance?
What is oops and why we use oops?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
Is react oop?
Why do we use oops?
What are the 3 pillars of oop?
What is the difference between procedural programming and oops?
Is oop better than procedural?
What are the components of marker interface?
How do you define social class?
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?
#include
Where You Can Use Interface in your Project
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
How many human genes are polymorphic?