1.3-Object-Georienteerd-Programmeren

Bingo mill

With this assignment we are going to build a bingo mill. Next week you will build the rest of the game. Read the assignment carefully before you start programming!

A bingo mill is a device that is used to determine the next number for the game of bingo. The balls in the mill run from 1 to 75. When playing the game, each number can only be drawn once! You will also need to build a reset() function so that the game can be played again.

Requirements:

Shuffle:

To make sure that we constantly get a new random ball out of the bingo mill we are going to build our own shuffle algorithm. As soon as the bingo mill is created, or when someone invokes the reset() method, the numbers 1 to 75 will be added to the machine. Then we can shuffle the list with the following algorithm steps:

By first filling in the list with all unique values (1-75) and then shuffling it, we can be sure that all numbers appear and there are no duplicates. Now you still have to figure out how to return the numbers 1-for-1!

Example

Preview