Question: Object-Oriented Design & Thinking The situation: Caring for the pets at an animal shelter Pet population 5 cats: Johnson Sylvester Marie Sally Sylvester (Pets often
Object-Oriented Design & Thinking
The situation: Caring for the pets at an animal shelter
Pet population
5 cats: Johnson Sylvester Marie Sally Sylvester
(Pets often have the same names. How will we distinguish them?)
5 dogs: Arturo Winston Linda Angela Carlos
Data we need to track:
- For pets: Name Date admitted Species Food code Daily weight Daily record of food consumed, for instance, 2022-02-04, 1 cup of S01 (code for Savor Selective) Health issues (may have more than one)
- Food Inventory ( measured in cups to keep it simple by avoiding measurement conversions): Food Code Food Name Manufacturer For Species ( cat or dog ) Current amount on-hand
- Staff: ID Last name First name
Process to manage ( to keep it simple, we'll concern ourselves with only one activity )
Feeding the pets
- A staff member takes the required amount of food for pet for from the inventory.
- The staff member records dispensing the food on the pet's daily record of food consumed
- The staff member reduces the amount of this food in inventory.
What you need to do in PYTHON:
- Create a Collaboration Responsibility Diagram for the scenario described above.
- Create UML Class diagrams for the classes you identify in the scenario described above. Show the access modifier, attributes and methods for each class. A major question: which class should own particular attributes, for instance:
- Should the pet health issues belong to the Pet class or should our little system have a Health Issues class?
- Should the Daily record of food consumed belong to the Pet class or should our little system have a Food Consumed class?
- Should the Daily record of pet's weights belong to the Pet class or should our little system have a Pet Weight Record class?
Something to consider: what other classes interact with pet health issues, daily food consumption and daily weights.
In light of this ambiguity, you must explain the reason for making your design choice.
- Either describe as a narrative or write the code for the method that records the feeding of the pets.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
