0
When would we use inheritance ?
3 Answers
0
Use it when you want to highlight 'is-a' relation between the classes. Circle is a Shape? => use inheritance. Also you should use it if you need polimorphysm => define base interface, derive concrete classes and control all of them via single interface.
+ 1
A basic Enemy have some behaviors and values, but there is more enemy types like Ninja and Monster that have it's own behaviors + basic Enemy behaviors
0
when you need to pass the values of one func to another without declaring them in that func.