Homework on objects

Homework on objects

For the following, give me anotated output of your program. So tell me in words what your program is doing and then have it do it. It should sound like a story at the end of the day!
  1. This assignment will have you create a program to manage a zoo. There are two basic objects, animals and cages. Each animal has a name (like Shanti the indian elephant, or Sing Sing the Panda bear) and a species type. Each cage has an size and a cage number.
    1. In the real world, animals would have to be escorted between cages with the help of zoo keepers. we will assume these animals can follow instructions--and hence don't need zoo keepers. Obviously this is just to make your life easier.
    2. All animals should be able transport themselves from one cage to another cage.
    3. Each cage should know which animals are members of that cage.
    4. Implement the above description as cleanly as possible.
    5. Besure to have the following:
      1. Print zoo (which prints out each cage and its contents)
      2. animal -> location which returns the location of an animal.
      3. animal -> name.
      4. animal -> species.
      5. animal -> move_to(cage). Has the animal move to a cage.
    6. populate your zoo with at least 4 different species of animals, and 20 different animals. Print out your zoo.
  2. When animals walk they make noise. These noises should be printed as the animals walk. So a duck should go "quack quack quack" as it walks along. (Obviously it takes more quacks if the distance between the cages is greater). Add sounds for each animal to print out as it moves around.
  3. Give each animal a home cage. Write the following functions:
    1. start_meeting: this should have everyone walk to the "main cage" for where ever they currently are.
    2. end_meeting: this should have everyone walk home.
  4. Finally add a "size" to each cage. Give each animal a "size" also. There shouldn't be more animals in a cage than can fit. Write a function called optional_move_to(cage) which checks if an animal can move to a cage. If it can be moved there without overflowing the cage, have him move there. This function should be an "animal" function not a species function.