US 01.01.06 ‐ CRC Cards - CMPUT301F26coders/coders GitHub Wiki

US 01.01.06 - CRC Cards

User Story:

  • As an entrant, I want to join an active lottery from the campsite details screen.

Description:

  • Allow entrants to join an active campsite lottery. The application prevents duplicate entries and does not allow entrants to join inactive lotteries.

CRC Card 1: Lottery

Responsibilities:

  • Store the lottery's status (active or inactive).
  • Store the entrants who have joined the lottery.
  • Check whether an entrant has already joined.

Collaborators:

  • Entrant

CRC Card 2: LotteryController

Responsibilities:

  • Receive requests to join a lottery.
  • Check whether the lottery is active.
  • Check whether the entrant has already joined.
  • Register the entrant if eligible.
  • Provide a success or failure message to the UI.

Collaborators

  • Lottery
  • Entrant

CRC Card 3: Entrant

Responsibilities:

  • Store the entrant's information.
  • Provide the entrant's identity for lottery registration.

Collaborators:

  • None