Skip to main content

Practice · 2 of 5

Dispatch chain, three deep

CHALLENGE
Difficulty: intermediate+25 XP

describe(Animal) is implemented. Predict via the dispatch table: what does it return for a Puppy? A Dog? A plain Animal? Confirm by keeping the code as-is and making the tests pass (the tests encode the correct answers).

Back to lesson: Practice: Inheritance lab