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

User Argyle
by
4.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
5.4k points