
10-152-311 - Object-Oriented Programming 1
6.2 Zoo Lab Class Diagram: Overview
- Modify the Violet UML class diagram contained withing this 6.2 Zoo Class Diagram starting zip file, following these specifications:
- Remove the following classes from the diagram, by "folding them in" to the classes which reference them, as appropriate:
- Vending Machine
- Change Animal class:
- Make the class abstract.
- Remove babyDingoWeight and babyPlatypusWeight fields.
- Add private preferredFootType (string) field.
- Add public PreferredFootType read/write property (with protected setter).
- Add protected abstract BabyWeightPercentage (double) read-only property.
- Create a public abstract Move method.
- Make the Reproduce method to be virtual.
- Add an overridden ToString method.
- Change the Mammal class:
- Make the class abstract.
- Add overridden Move method.
- Add overridden Reproduce method.
- Move animal-specific methods down from the Animal class to the appropriate descendant:
- Mammal: FeedNewborn.
- Make the Platypus class sealed.
- Create a Bird class:
- Make the class abstract.
- Descend from the Animal class.
- Add a constructor with three parameters: age (int), name (string), and weight (double).
- Add overridden Move method.
- Create a Hummingbird class:
- Descend from the Bird class.
- Add a constructor with three parameters: age (int), name (string), and weight (double).
- Add overridden BabyWeightPercentage.
- Add overridden Eat method.
- Add overridden BabyWeightPercentage property to Dingo, Platypus, and Hummingbird classes.
- Using Violet, export the diagram to a .png file (File, Export to | Image file).
- Submit the file via Blackboard.