Need some help where to start...what to do????
The objective of this program is to simulate playing the game of Bingo.
A Bingo card basically consists of a 2-d array of 5 rows and 5 columns containing integers. The first column contains integers in the range 1-15, the second column (16-30), the third column (31-45), the fourth column (46-60) and the fifth column (61-75). The numbers are not repeated. The central square is a free square (say 0). An example is shown below:
11 17 33 49 65
1 29 41 59 66
13 25 0 47 63
7 22 44 55 74
10 18 34 51 70
Your program should read a set of numbers representing such a Bingo card as input. It should then generate random numbers between 1 and 75 (non-repeated). When each number is generated, if it is present in the card, it should be “marked”. If a column, diagonal or row of marked numbers is obtained, then “BINGO!”, the game is won. If no such column, diagonal or row is obtained after 25 attempts, then the program should print “GAME OVER!” and quit.
You can show the winning card as a separate one, with the called numbers shown and the others filled with 0.
A sample run of the program is given below:
Welcome to the Bingo game simulation
Enter the Bingo card numbers: 11 17 33 49 65 1 29 41 59 66 13 25 0 47 63 7 22 44 55 74 10 18 34 51 70
Here’s your card
11 17 33 49 65
1 29 41 59 66
13 25 0 47 63
7 22 44 55 74
10 18 34 51 70
Number called: 44
Present
Number called: 56
Not present
Number called: 74
Present
Number called: 22
Present
Number called: 1
Present
Number called: 55
Present
Number called: 62
Not present
Number called: 7
Present
BINGO!
0 0 0 0 0
1 0 0 0 0
0 0 0 0 0
7 22 44 55 74
0 0 0 0 0
Note: Use the principles of modular programming by designing methods to do the v
arious tasks in the program such as generating the random number, checking if the number is present, checking for Bingo!, and printing the card.