Please fork this repository and enhance it with the following requirements:
Pets shall have a weight. Use the following data for the existing test objects:
- Garfield: 20.0
- Odie: 15.0
- Peter Parker: 0.5
- Kaa: 25.0
- Nemo: 0.5
- Alpha: 0.1
- Splinter: 0.5
- Coco: 6.0
- Tweety: 0.05
Person shall have a prefered weight. Weight classes are defined as:
- Extra Small: 0 < x <= 1.0
- Small: 1.0 < x <= 5.0
- Medium: 5.0 < x <= 15.0
- Large: 15.0 < x <= 30.0
- Extra Large: 30.0 < x
Use the following data for the existing test objects:
- Dalinar: Medium
- Kaladin: Extra Small
All preferences (classification, type, weight) shall be overridable.
A person shall be able to have unlimited number of overrides
Pet decisions shall be made using the following hierarchy (1 overrides 2, 2 overrides 3, etc.):
- Type
- Classification
- Weight
- Default Type/Classification/Weight on person object
For example, given Person A below:
{
Name: 'Person A',
PreferredClassification: PetClassification.Mammal,
PreferredType: PetType.Cat
}
And Pet object:
{
Name = "Odie",
Classification = PetClassification.Mammal,
Type = PetType.Dog
}
This would return as a good pet match because the user's preferred classification matches the pet's classification. However, if Person A was opposed to dogs, we would want to be able to add an override for PetType.Dog so that this would no longer be a good match.