Object-Oriented Programming 1: 2.1 Zoo Class Diagram

  1. Create a class diagram
  2. Create a class diagram that represents the existing 1.2 Zoo source code, which should look very similar to the class diagram below.

    Class Diagrams (15:18)

    Class Diagrams vs. Object Diagrams (9:40)

    2.1 Zoo - starting class diagram
  3. Enhance the UML class diagram
  4. Using the diagram from the previous step, make the changes listed below.

    1. Add a BirthingRoom class with a field named Temperature of type double and Vet of type Employee.
    2. Create a field in the Zoo class named B168 of type BirthingRoom.
    3. Add a VendingMachine class with a field named FoodStock of type double and field named MoneyBalance of type decimal.
    4. Create a field in the Zoo class named AnimalSnackMachine of type VendingMachine.
    5. "Fold in" the LadiesRoom and MensRoom fields of the Zoo class and remove the Restroom class from the diagram.
    6. Remove the dependency reference from the MainWindow class to the Zoo class, and replace it with a 1-to-1 association reference named ComoZoo.
  5. Export diagram and submit to Blackboard
    1. Save the diagram by clicking File | Save in Violet.
    2. Tip: Ensure that Violet adds a .class.violet extension to the file when saving.

    3. Export the diagram by clicking File | Export to | Image file in Violet and exporting a .png file.
    4. Submit the diagram by uploading the .png file to Blackboard.