Question: Java Bingo Game Include a Test Class: The main method in the test class will create a GameManager, then call the play method specifying the
Java Bingo Game
Include a Test Class: The main method in the test class will create a GameManager, then call the play method specifying the number of games to be played, and the number of wins per game. Finally the displayResults method is called to see who won


Java Bingo Game The first item that needs to be modeled is the bingo cage which contains 75 bingo balls, cach of which has a letter and number (ie. B15). As the game is being played, a random bingo ball is removed from the cage and that bingo ball's letter and number are the next value to be played. To begin a new game, all the bingo balls are placed in the cagc The second item that needs to be modeled is the bingo card which contains 5 columns of 5 numbers. The 5 columns correspond to the letters B, I, N, G, O. Each column contains random values in the following ranges: B thru 15 16 thru 30 . Column 2: N 31 thru 45 . Column 3: G46 thru 60 . Column 4: O 61 thru 75 . Column 0: . Column 1: I Each spot on the card must be able to be marked as played whenever a bingo ball is played. For instance, if ball N35 is played, and the spot in column 2 row 4 contains a 35, then that spot must be marked in some way to indicate that the number 35 was already played. The center spot on a bingo card is a frec spot, so the spot in column 2 row 2 must always be marked as played. A bingo card must be able to be analyzed for the number of wins it contains. It is possible for multiple wins to result from a single ball being played. A win results from any of the following All spots in a row have been marked All spots in a column have been marked All spots in either diagonal have been marked At the start of each new game, all the marks on the card from the previous game must be removed The third item that needs to be modeled is the bingo player. Each player has a name. A player can play any number of bingo cards. At the beginning of cach new game, a player must clear the marks from all their bingo cards. Whenever a bingo ball is played, a player is informed of the column and number being played. The player plays that column and number on each of their bingo cards. The player checks all cards for the number of wins thus far in the game. Whenever a new game starts, the number of wins from the current game is added to the total wins the player already has. The fourth item that needs to be modeled is the game manager. The game manager controls the bingo cage and manages all the players participating in a bingo session. The game manager plays a specified number of games in a bingo session. Each game is played until a spe cach game, the game manager makes sure the bingo cage contains all the bingo balls, and that cach player has a chance to unmarked all their bingo cards. The game manager provides cach player with column and number information for each bingo ball that is played. The game manager gets the number of wins in the current game per player as cach bingo ball is played. The game manager stops a game when the total wins for the current game has equaled or exceeded the minimum wins required. After playing a bingo session, the game manager reports how many wins each player has achieved cified minimum number of wins have been achieved. At the start of
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
