10-152-311 - Object-Oriented Programming 1

4.2 Zoo Lab Sequence Diagram: Overview

  1. Create a UML sequence diagram in Violet following these specifications:
    1. The MainWindow has a method floraBirthDingoButton_Click().
    2. The MainWindow has a nested object, ComoZoo (Zoo).
    3. This button click method has to call the following methods:
      1. ComoZoo.CalculateTotalAnimalWeight() (to get the beginning weight). It returns a double.
      2. ComoZoo.FindAnimal(). It takes parameters of type (string) and isPregnant (bool). It returns an Animal.
      3. ComoZoo.BirthAnimal(). It takes a parameter of mother (Animal). It returns an Animal.
      4. ComoZoo.CalculateTotalAnimalWeight() (to get the ending weight). It returns a double.
    4. ComoZoo has a nested object, B168 (BirthingRoom).
    5. ComoZoo's BirthAnimal() method must call B168.BirthAnimal(). This method takes a parameter mother (Animal). It returns an Animal.
    6. B168 has a nested object, Vet (Employee).
    7. B168's BirthAnimal() method must call Vet.DeliverAnimal(). This method takes a parameter mother (Animal). It returns an Animal.
    8. Vet interacts with the passed-in mother animal.
    9. Vet's DeliverAnimal() method must call the following methods:
      1. this.SterilizeBirthingArea()
      2. mother.Reproduce(). It returns an animal.
      3. this.WashUpBirthingArea().
    10. The mother animal's Reproduce() method must call this.FeedNewbord().
  2. Using Violet, export the diagram to a .png file (File, Export to | Image file).
  3. Submit the file via Blackboard.