US 01.01.02 ‐ CRC Cards - CMPUT301F26coders/coders GitHub Wiki
CRC Card 1: Campsite
Class: Campsite
Responsibilities:
- Stores the campsites name
- Store the campsite's location
- Stores the campsite's available dates
- Stores the maximum number of guests the campsite can accommodate
- Provide campsite information needed for filtering
Collaborators:
- NONE
CRC Card 2: CampsiteFilterController
Class: CampsiteFilterController
Responsibilities:
- Receive the user's selected location, date, and number of guests
- Send the selected filters to CampsiteRepository
- Receive the matching campsites
- Provide the results to the UI to display
Collaborators:
- CampsiteRepository
CRC Card 3: CampsiteRepository
Class: CampsiteRepository
Responsibilities:
- Retrieve stored campsite information.
- Check campsites against the selected location, date, and number of guests.
- Return campsites that match all three filters.
- Return an empty list if no campsites match.
Collaborators:
- Campsite