Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago