Tutorial¶
Objective¶
We will build a simple Lottery application. A Lottery application has the following requirements:
- An user can create a new lottery game
- An user can add participants
- condition: a participant can only be added once
- condition: a participant can only be added if a winner is not yet selected
- An user can remove a participant
- condition: if a winner is not yet selected
- An user can run the lottery which will select a winner
- condition: we can only select a winner if there is at least one participant
- condition: we can only select a winner once, afterwards an error is produced when trying to select a new winner