10-152-311 - Object-Oriented Programming 1

6.1 Zoo Lab Class Diagram: Overview

  1. Modify the Violet UML class diagram contained withing this 6.1 Zoo Class Diagram starting zip file, following these specifications:
    1. Remove the following classes from the diagram, by "folding them in" to the classes which reference them, as appropriate:
      1. Food
      2. Restroom
      3. Guest
      4. Wallet
      5. Booth
      6. BirthingRoom
      7. Employee
    2. Change animal type parameters from "string" to "Type":
      1. Zoo.FindAnimal (3)
      2. VendingMachine.LookupFoodPrice()
    3. Remove the "type" parameter from both Animal constructors.
    4. Remove the "type" field from the Animal class.
    5. Remove the "type" property from the Animal class.
    6. Create a Mammal descendant class of Animal and Dingo and Platypus descendants of Mammal:
      1. Connect them to their base classes using an "inherits from" (is-a) connecting line.
      2. Add a constructor to each class, with three parameters: age (int), name (string), and weight (double).
    7. Move animal-specific methods down from the Animal class to the appropriate descendants:
      1. Dingo: Bark(), BuryBone(), and DigUpAndEatBone().
      2. Platypus: ShowAffection().
  2. Using Violet, export the diagram to a .png file (File, Export to | Image file).
  3. Submit the file via Blackboard.