Task 2 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

7.4 Polymorphism — describe all animals

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in describeAll so that it returns the describe() of every animal, joined by newlines.

The array holds a Dog and a Cat, but its type is Animal[] — each element still runs its own version of describe(). That is polymorphism.

Your solution