Task 6 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.1 Inheritance — write the Fish subclass

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

Write Fish extends Animal with a constructor using super, and a method label(int id) returning the id, then ": ", then the name.

For id 7 and the name Nemo the second line is 7: Nemo.

Your solution