Question: Create a new Eclipse Java project. Call it TicTacToe Final. Copy the package games.board from your Lesson 5 project into the new project. Rename the

Create a new Eclipse Java project. Call it TicTacToe Final.
Copy the package games.board from your Lesson 5 project into the new project.
Rename the file BoardGameTester.java to TicTacToeGame.java. To do this, select the file in the Project Explorer, then choose Refactor > Rename from the main menu.
In the TicTacToeGame.java file, in the TicTacToeGame class, add a new method named getOutcome() that returns an Outcome enumeration. Use the winOrTie() method in the Lesson 2 graded project as a guide.
In the takeTurn() method, in the TicTacToeGame class, use the getOutcome() method to determine whether to continue the game.
Also in the takeTurn() method, display a dialog message that displays the winner or reports a tie when the game ends. When the dialog is dismissed, your program should terminate.
In the Board.java file, in the Board class, modify the catch block in the setCell() method, which you added in Lesson 5, to use a dialog box to display the error. The program should continue when the dialog is dismissed.
Build and run the project. Verify that it works as expected. Dont be discouraged if it doesnt run as expected right away. Try tracing your steps and using System.out.write statements to figure out where you went wrong.

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!