224k views
4 votes
When should we not use Inheritance in programming?

User Argyle
by
7.9k points

1 Answer

5 votes

Answer:

You shouldn't be using inheritance if your program doesn't reuse code a lot.

Step-by-step explanation:

This is really the purpose of inheritance, to make it easier for us to call repeated method calls without having to copy and paste all the time and making our program long and redundant. If you have simple programs that don't have repeated calls, then inheritance is unnecessary.

User MrAlek
by
8.6k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.