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