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

  1. A staff member takes the required amount of food for pet for from the inventory.
  2. The staff member records dispensing the food on the pet's daily record of food consumed
  3. The staff member reduces the amount of this food in inventory.

What you need to do in PYTHON:

  1. Create a Collaboration Responsibility Diagram for the scenario described above.
  2. 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:
    1. Should the pet health issues belong to the Pet class or should our little system have a Health Issues class?
    2. Should the Daily record of food consumed belong to the Pet class or should our little system have a Food Consumed class?
    3. 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.

  1. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!