There is no (technical) limit to how deeply we can nest an inheritance tree. For example:
Tiger inherits from Feline inherits from Animal inherits from LivingThing.
That said, be careful! New programmers often get carried away. You should never think to yourself:
"Well most wizards are elves... so I'll just have
Wizardinherit fromElf"
A good child class is a strict subset of its parent class.
Let's add a new game unit: Crossbowman. A crossbowman is always an archer, but not all archers are crossbowmen. Crossbowmen have several arrows, but they have an additional method: triple_shot().
3 arrowsTARGET was shot by 3 crossbow bolts where TARGET is the name of the Human that was shot (any Human can be a target).