10-152-311 - Object-Oriented Programming 1

3.1 Zoo Lab Class Diagram: Overview

In this week's assignments, create a UML class diagram for the Zoo's information given below.

3.1 Zoo Lab Class Diagram: Directions

  1. Using the previous lab class diagram as a starting point, add/remove classes (by "folding in" any fields as appropriate) such that the following classes (and their contents) are displayed:
    • MainWindow
    • Animal
    • BirthingRoom
    • Guest
    • Wallet
    • Zoo
  2. Enhance your existing UML class diagram (from the completed previous assignment) to include the following changes:
    1. Add a class "Wallet" with the following fields:
      1. Color (string)
      2. MoneyBalance (decimal)
    2. Add a class "Guest" with the following fields:
      1. Age (int)
      2. Name (string)
      3. Wallet (Wallet)
    3. Add these fields to the existing Zoo class:
      1. Animals (List of Animal)
      2. AverageAnimalWeight (double)
      3. Guests (List of Guest)
      4. TotalAnimalWeight (double)
    4. Add these buttons to the MainWindow class:
      1. calculateAnimalWeightsButton (Calculate animal weights)
      2. findFredAgeButton (Find Fred's age)
  3. Using Violet, export the diagram to a .png file (File | Export to | Image file).
  4. Submit the file via Blackboard.