/** A 2 dimensional array filled with random gifts */ public class RegiftRobin { /** Constructs an empty board. */ public RegiftRobin() { board = new String[ROWS][COLUMNS]; // Fill the board with gifts in a random order each time class is run // using the GIFTS array as the source of the gifts and Math.random() // as the random number generator. // Make sure the gifts in positions that are a multiple of 9 are the same // There are several ways to do this... } /** Creates a string representation of the array @return the string representation */ public String toString() { String r = ""; for (int i = 0; i < ROWS; i++) { //r = r + "| "; for (int j = 0; j < COLUMNS; j++) r = r + board[i][j] + " "; r = r + " \n"; } return r; } private String[][] board; private static final int ROWS = 11; private static final int COLUMNS = 9; private static final String GIFTS[] = {"Back Massager ", "Wind Chimes ", "Scented Candle ", "Flower Vase ", "Tire Gauge ", "Garden Decor ", "Pen/Pencil Set ", "Business Card ", "Laser Pointer ", "Java Book ", "Barbeque Tools ", "A Good Book ", "Key Chain ", "Coffee Mill ", "Candy Dish ", "Placemats ", "Stuffed Animal ", "Kitty Cat ", "Cordless Drill ", "Neck Tie ", "Clock Radio ", "Gift Certificat", "Cell Phone ", "Snow Globe ", "Manicure Set ", "5 on AP Exam ", "Electric Razor ", "Toaster ", "Purple Mittens ", "Indoor Grill ", "Tote Bag ", "Scented Candle ", "Laser Pointer "}; }