# Pair Programming - Giulia
## Agenda
* 1:00 - 1:15: Welcome and agenda (15m)
* 1:15 - 1:40: Scope and architechture definition with the team (25m)
* 1:40 - 3:00: Pair programming with Mateus (1h20m)
* 3:00 - 3:10: Break (10m)
* 4:10 - 4:30: Pair programming with Eduardo (1h20m)
* 4:30 - 5:00: Project presentation, discussion, and questions (30m)
-----
1. Houses have a status (owned and rented). If owned she is eligible for Home insurance. If rented she is eligible for Renters insurance and Home rules are applied to it.
*Input*
```jsx
{
"age": 35,
"dependents": 2,
"house": {"ownership_status": "rented"},
// "house": {"ownership_status": "owned"},
"income": 0,
"marital_status": "married",
"risk_questions": [0, 1, 0],
"vehicle": {"year": 2018}
}
```
*Output*
```jsx
{
"auto": "regular",
"disability": "ineligible",
"renters": "economic",
// "home": "economic,
"life": "regular"
}
```
-------
2. The user can have from 0 to N `vehicles` and `houses`. The payload will change to a `list` of `objects`. If the user has only one vehicle, add 1 point to that vehicle’s score. This same rule applies to houses.
*Input*
```jsx
{
"age": 35,
"dependents": 2,
"houses": [
{"id": 1, "ownership_status": "owned"}
],
"income": 0,
"marital_status": "married",
"risk_questions": [0, 1, 0],
"vehicles": [
{"id": 1, "year": 2019},
{"id": 2, "year": 2010},
{"id": 3, "year": 2012},
]
}
```
*Output*
```jsx
{
"auto": [
{"id": 1, "plan": "regular"},
{"id": 2, "plan": "economic"},
{"id": 3, "plan": "economic"},
],
"disability": "ineligible",
"home": [
{"id": 1, "plan": "regular"}
],
"life": "regular",
}
```
-----
3. Add Umbrella insurance line. If the user got an economic score in any of the four main lines of insurance (life, disability, home & auto), he is eligible to get umbrella insurance. Base rules are applied to it.
*Input*
```jsx
{
"age": 35,
"dependents": 2,
"house": {"ownership_status": "owned"},
"income": 0,
"marital_status": "married",
"risk_questions": [0, 1, 0],
"vehicle": {"year": 2018}
}
```
*Output*
```jsx
{
"auto": "regular",
"disability": "ineligible",
"home": "economic",
"life": "regular",
"umbrella": "economic"
}
```