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