10-152-311 - Object-Oriented Programming 1

5.1 Zoo Lab Class Diagram: Overview

  1. Modify the Violet UML class diagram contained withing this 5.1 Zoo Class Diagram starting zip file, following these specifications:
    1. Make all (both read-only and normal) fields on the class diagram to be private.
    2. Make these existing methods to be private:
      1. Employee; SterilizeBirthingArea() and WashUpBirthingArea().
      2. Animal; Bark(), BuryBone(), DigUpAndEatBone(), FeedNewborn(), and ShowAffection().
      3. VendingMachine; AddMoney(), BuildDingoFoodPacket(), BuildPlatypusFoodPacket(), IsDingoFoodAvailable(), and IsPlatypusFoodAvailable().
    3. Add constructors to the following classes:
      1. Restroom; must take parameters of capacity (int) and gender (string).
      2. Guest; must take parameters of age (int), name (string), moneyBalance (decimal), and walletColor (string).
      3. Wallet; must take parameters of color (string) and moneyBalance (decimal).
      4. Booth; must take a parameter of ticketPrice (decimal).
      5. Employee; must take parameters of name (string) and number (int).
      6. Animal; must take parameters of name (string), type (string), and weight (double); a second (overloaded) constructor must take parameters of age (int), name (string), type (string), and weight (double).
      7. VendingMachine; must take parameters of dingoFoodPrice (decimal), and platypusFoodPrice (decimal).
      8. Food; must take a parameter of type (string).
      9. Zoo; must take parameters of capacity (int), name (string), restroomCapacity (int), and ticketPrice (decimal).
    4. Add a read-only field to the VendingMachine class:
      1. initialMoneyBalance (decimal).
    5. Add the following methods to the Zoo class:
      1. AddAnimal; must take a parameter of animal (Animal).
      2. AddGuest; must take a parameter of guest (Guest).
    6. Add the following method to the Animal class:
      1. MakePregnant.
  2. Using Violet, export the diagram to a .png file (File, Export to | Image file).
  3. Submit the file via Blackboard.