Question: hello, please help me with this code I am having a lot of trouble :C. Thanks! We want to write a Java program to simulate

hello,

please help me with this code I am having a lot of trouble :C.

Thanks!hello, please help me with this code I am having a lot

of trouble :C. Thanks! We want to write a Java program to

We want to write a Java program to simulate a simplified version of bingo game. Players use cards that feature five columns of five cells each (a 5x5 matrix), with every cell containing a number between 1 to 90. In each step of the game a number between 1 and 90 is called randomly and players need to mark the number in their card if they have it. The first player who marks all of the numbers in one row of one of his/her cards is the winner of the game. Following is the skeleton of the classes that you need to complete //class Bingo should have an array of Player objects as its instance field class Bingo f public Bingo (Player[] players); Creates an object of Bingo game using an array of Player objects passed as an argument. public String play(int number); This is the main method for playing the game. It takes a number (the number that is called) and marks the cells with that number in all players' cards. It also returns the name of the winner, if any. If there is no winner, it return an empty string. If there is more than one winner, it returns the name of al1 winners as one string, separated by space (again, no space at the end of the String). For example, if player1, player2, and player3 win the game in one turn, it returns "player1 player2 player3". //class Player should include an array of Card objects as well as the name of the Player object as a String class Player public Player(String name, Card[] cards); Creates a Player object using the name of the player and an array of bingo cards for the player. public String getName (); Returns the name of the player. public Card[] getCards(); Returns player's bingo cards public boolean isWinner(); Checks if the player is a winner We want to write a Java program to simulate a simplified version of bingo game. Players use cards that feature five columns of five cells each (a 5x5 matrix), with every cell containing a number between 1 to 90. In each step of the game a number between 1 and 90 is called randomly and players need to mark the number in their card if they have it. The first player who marks all of the numbers in one row of one of his/her cards is the winner of the game. Following is the skeleton of the classes that you need to complete //class Bingo should have an array of Player objects as its instance field class Bingo f public Bingo (Player[] players); Creates an object of Bingo game using an array of Player objects passed as an argument. public String play(int number); This is the main method for playing the game. It takes a number (the number that is called) and marks the cells with that number in all players' cards. It also returns the name of the winner, if any. If there is no winner, it return an empty string. If there is more than one winner, it returns the name of al1 winners as one string, separated by space (again, no space at the end of the String). For example, if player1, player2, and player3 win the game in one turn, it returns "player1 player2 player3". //class Player should include an array of Card objects as well as the name of the Player object as a String class Player public Player(String name, Card[] cards); Creates a Player object using the name of the player and an array of bingo cards for the player. public String getName (); Returns the name of the player. public Card[] getCards(); Returns player's bingo cards public boolean isWinner(); Checks if the player is a winner

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!