8.11.2. Exercise 2 [40 min]
Add a Person class at the same level as
Animal, and have both of them inherit from a new
class called LivingCreature. Also make the
speak method take a parameter of what to say,
falling back to the sound (humming for a Person)
if no parameter is given. Since this isn't Dr.
Doolittle, make sure the animals can't talk. (That
is, don't let speak have any
parameters for an animal.) Try not to duplicate any code, but be sure
to catch likely errors of usage, such as forgetting to define a
sound for an animal.
Demonstrate the Person class by invoking a person
with nothing to say, and then demonstrate it a second time by
invoking a person with something to say.