US 01.01.03 ‐ CRC Cards - CMPUT301F26coders/coders GitHub Wiki
Users Story: US 01.01.03
- As an entrant, I want to see a list of campsites based on my filters.
Description:
- After the user wrote their desired campsites filters, It shows a list of campsites based on their selected filters, and shows an error screen saying "No campsites found" for no matches.
CRC Card 1: Campsite Responsibility:
- Store the campsite's name.
- Store the campsite's location.
- Store the campsite's available dates.
- Store the maximum number of guests the campsite can accommodate.
Collaborators:
- NONE
CRC Card 2: FilteredCampsitesController Responsibility:
- Request the matching campsites from the campsite repository
- receives the list of matching campsites
- Provide the list to the UI to display the campsites
- Handles the case for no matches
Collaborators:
- CampsitesRepository
CRC Card 3: CampsitesRepository Responsibility:
- Retrieve the campsites matching the previously selected filters.
- Return the list of matching campsites.
- Return an empty list if no campsites match.
Collaborators:
- Campsite