Live coding today! We design and implement classes for various animals (Animal
, Fish
, Bird
, Penguin
, and Parrot
). What is an appropriate hierachy? What class and instance attributes do we need? Can we have default values for some attributes? What methods do we need and which ones should we override?
Zoo
and lets you interact with the animals. You can play a little at the zoo, and then read the code to see how we use Animal
and its subclasses.