Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hi, i cant figure out how to write this program, this is in java Help Last edit was made yesterday at 7:47 PM by Jack

hi, i cant figure out how to write this program, this is in java image text in transcribed
image text in transcribed
Help Last edit was made yesterday at 7:47 PM by Jack Stansbury AP CSA - Bingo Program BINGO 3 29455668 1 19 43 50 72 Directions | 427 42 (Required) Part 1: 1. Create a BingoCard Class. A BingoCard Object has one instance field, an ArrayList of Integers called board. 2. Create the constructor to set up the instance field board, and fill it with valid numbers a. The B column should contain 5 random numbers in the range 1-15, b. The I column is 16-30 C. The N column is 31-45, (with free space in the middle) d. The G column is 46-60 e. The O column is 61-75 Things to consider You can't have duplicate numbers on a BINGO board. One way to make sure you don't have duplicates is to fill a different arrayList with numbers 1-15, and then randomly remove numbers one at a time until you have 5 to place into the B column of the board 3. Create the toString() method. The toString() method should return a visual of the board. For testing purposes, this can be system.out.print, using " " and spaces to separate the columns 4. Create the Bingo Tester Class. The Bingo Tester Class should create a bingo object and print it. (Required) Part 2 1. Write the class method boolean haveNum(int num), which takes as a parameter the called number", which is eventually generated by the getNums() method. If the number is in the board ArrayList, you should change the number to its negative value. (or change it to an "X"). 2. From main, test the haveNum() method by calling it, then printing the board. For testing purposes, you can just pass haveNum) different numbers to see if it works Ontional Part 3 3. Internet 9 Bingo Program - G... Eclipse IDE Launcher DOLL ogle.com/document/d/1seeAAUSRNXIB:S5mp pl3VIIRUKUMPFB1q/edit Help Last edit was made yesterday at 7:47 PM by Jack Stansbury 2. From main, TOS O naveNum method by calling it, then printing the board. For testing purposes, you can just pass haveNum) different numbers to see if it works (Optional) Part 3 1. Write the class method haveBingo() to see if you have won BINGO. There are several ways to win, each should be a separate method that's called by haveBingo) a. Horizontal Line (5 in a row) b. Vertical Line (5 in a row) C. Diagonal / or 1 (passing through Free Space) 2. Test your methods to see if you can win (Required, Maybe) Part 4 1. Create a BingoGame class. A BingoGame object has 2 instance fields, an ArrayList of Bingo Card Objects, and an ArrayList of calledNums 2. Write the constructor for the BingoGame class. It just needs to instantiate the two ArrayLists 3. Create the getNums() method. This method should: a. Pick a random number from 1-75 and add it to the ArrayList called Nums. Once again, you have to make sure you don't ever get duplicates. You can use the same idea, removing numbers at random from a different ArrayList that initially contains the 1-75 b. Call haveNum(num) for each Bingo Object in the ArrayList. Each BingoCard Object would then call haveBingo() to see if it's a BINGO! /***until you write haveBingo().just have it return "Method Under Construction or something, just so the code will compile ***/ Part 5:(Optional) 1. Create a GUI for your Bingo Game to use 3. Internet g Bingo Program - Eclipse IDE Launcher DOLL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions