Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, i already wrote the code for the BingoGame but I dont know what i can add in

ID: 3543565 • Letter: H

Question

Hi, i already wrote the code for the BingoGame but I dont know what i can add in the code. Please help!!!

Here is the BingoGame class:

import java.util.ArrayList;
import java.util.Random;

public class BingoGame {
  
  public static void main (String[] args)
  {
    final int NUM_BALLS = 75, NUM_PULLS = 50;


    //1.Instantiates an ArraySet object to hold the BingoBalls for a game of Bingo.
    ArraySet<BingoBall> bingoSet = new ArraySet<BingoBall>();
    BingoBall ball;
    
    //2.Fills the ArraySet with Bingo balls numbered 1 through 75
    for(int num = 1; num <= NUM_BALLS; num++) {
      ball = new BingoBall(num);
      
      //3.Creates a BingoCard object to play the game
       BingoCard myBingoCard = new BingoCard();
       
       //4.Uses a loop to draw a BingoBall at random from the ArraySet object,
       //calls the BingoCard cover method, and, if cover returns true, calls the BingoCard hasBingo method.  
       //It terminates the loop when the hasBingo method returns true.
       if (myBingoCard.cover(new BingoBall(Math.random()) && myBingoCard.hasBingo())
             return true;
           
           //Prints out the word

Explanation / Answer

// u can add

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote