Question: 8.1.7 Tic Tac Toe Board Please complete the code in Java public class TicTacToeTester { //You don't need to alter any of the code in

8.1.7 Tic Tac Toe Board

Please complete the code in Java

8.1.7 Tic Tac Toe Board Please complete the code in Java publicclass TicTacToeTester { //You don't need to alter any of the code

public class TicTacToeTester { //You don't need to alter any of the code in this class! //This is just to test that your TicTacToe class is working correctly public static void main(String[] args) { TicTacToe board = new TicTacToe(); printBoard(board.getBoard()); } public static void printBoard(String[][] array) { for(String[] row: array) { for(String play: row) { System.out.print(play+ " "); } System.out.println(); } } } *************************************************************************************************************************************************************************************************************************

public class TicTacToe { }

Status: Not Submitted 8.1.7: Tic Tac Toe Board Save Submit + Continue RUN CODE | TEST CASES ASSIGNMENT DOCS | GRADE | MORE 5 points Status: Not Submitted FILES Create a Tictactoe class that initializes a 3x3 board of "-" values. We will use this class in future exercises to fully build out a Tic Tac Toe game! TicTacToe.java The Tictactoe class should have a 2D array as an instance variable and a constructor that initializes the 2D array with the "-" value. O TicTacToeTester.java Add a getter method that returns the private 2D instance variable. 1 public class TicTacToeTester 2- { 3 //You don't need to alter any of the code in this class! 4 //This is just to test that your TicTacToe class is working correctly 5 public static void main(String[] args) 6- { 7 TicTacToe board = new TicTacToe(); 8 printBoard(board.getBoard()); 9 } 10 11 public static void printBoard(String[] [] array) 12 { 13 for(String[] row: array) 14 - { 15 for(String play: row) 16 { 17 System.out.print(play+ " "); 18 } 19 System.out.println(); 20 } 21 } 22 } 23 Status: Not Submitted 8.1.7: Tic Tac Toe Board Save Submit + Continue RUN CODE | TEST CASES ASSIGNMENT DOCS | GRADE | MORE U 5 points Status: Not Submitted FILES 1 public class TicTacToe 2-{ 3 4 5 } 6 Create a Tictactoe class that initializes a 3x3 board of "-" values. We will use this class in future exercises to fully build out a Tic Tac Toe game! TicTacToe.java The Tictactoe class should have a 2D array as an instance variable and a constructor that initializes the 2D array with the "-" value. 0 TicTacToeTester.java Add a getter method that returns the private 2D instance variable.

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!