Write a complete program with Animal, Dog (which adds fetch()) and Cat.
Read a count and that many pairs «kind name», store them all in one Animal[]. For each animal print fetch() if it is a dog, otherwise describe(). Finish by printing how many dogs there were.
For 3 then dog Rex cat Kit dog Bo:
Rex fetches
Kit is an animal
Bo fetches
2
fetch() is invisible through an Animal variable — check with instanceof, then cast.