2 ms·
> Then if all those classes inherit from a common animal ancestor, the calling code would simply say: animal.makesound() Which of course throws an exception in
by mintplant 11y ago
> Then if all those classes inherit from a common animal ancestor, the calling code would simply say: animal.makesound()
Which of course throws an exception in the case of Monk (inheriting from Animal -> Human), as it has taken a vow of silence.