Question: I need help with this program for making a tic tac toe for two players that are named Player X and Player O. I also

 I need help with this program for making a tic tac

toe for two players that are named Player X and Player O.

I also need help with the surrounding of the tic tac toe

board that needs to be closed all around with lines. INSTRUCTIONS For

I need help with this program for making a tic tac toe for two players that are named Player X and Player O. I also need help with the surrounding of the tic tac toe board that needs to be closed all around with lines.

INSTRUCTIONS For part 1 you need to create two classes: TicTacToe Main The Main class will only need one method: main. In main you must instantiate a local variable of type TicTacToe and call the printBoard method. The TicTacToe class should have a constructor and a printBoard0 method. TicTacToe should start off with one private instance variable, board, which is a two-dimensional array of CellStates (with 3 rows and 3 columns). In the TicTacToe constructor, make sure to assign one of the values in the board to CellState X and one to CellState. O (purely for testing purposes). CellState is an enum that has three values: X. O, and EMPTY. I recommend defining CellState inside TicTacToe.java. You have permission to add other methods that may be useful. For instance, many students choose to write a short getCellText method that takes a CellState as input and returns one of three Strings: "X", which is useful since you don't want to print EMPTY when displaying your board. -0% or UML Diagram for TicTacToe TicTacToe - board : CellState(11) > TicTacToe + printBoard() : void Final Output After completing the next two parts of this assignment, interaction with the program will look like the following. Plan accordingly when writing your printBoard method: C\Windows\System32\cmd.exe x Player X's turn. Player X: Enter row (0, 1 or 2): 1 Player X: Enter column (@, 1 or 2): 1 X Player 0's turn. Player 0: Enter row (8, 1 or 2) : Player 0: Enter column (e, 1 or 2): 2 0 X 0 Player X's turn. Player X: Enter row (e, 1 or 2): Player X: Enter column (@, 1 or 2): 2 Invalid move to row 0, colum 2 Player X: Enter row (0, 1 or 2): 2 Player X: Enter column (0, 1 or 2): 3 Invalid move to row 2, colum 3 Player X: Enter row (0, 1 or 2): 0 Player X: Enter column (0, 1 or 2): 1 C:\Windows\System32\cmd.exe x 0 X Player O's turn. Player 0: Enter row (e, 1 or 2): 2 Player 0: Enter column. 1o, 1 or 2): 2 Player X's turn. Player X: Enter row (@, 1 or 2): 1 player X: Enter column (0, 1 or 2): 2 X 0 X X 1 o PA Player O's turn. Player 0: Enter row (0, 1 or 2): Player 0: Enter column (@, 1 or 2): 2 X 0 x x 1 0 O X G C:\Windows\System32\cmd.exe Player x's turn. Player X: Enter now (@, 1 or 2): 1 Player X: Enter column (e, 1 or 2): 0 X 0 X O player x wins

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!