Repeat Project to play the game of tic-tac-toe. The class that represents the game board should assume that values that are input to its methods are legal. Its game-playing client should interact with...


Repeat Project to play the game of tic-tac-toe. The class that represents the game board should assume that values that are input to its methods are legal. Its game-playing client should interact with the user and ensure that legal data is sent to the game board. To facilitate checking the validity of input data, handle the exceptions that Scanner methods such as nextInt might throw. Consult the documentation for the Java Class Library as needed.  If a client were to pass invalid data to the game-board class, an exception—an ArrayIndexOutOfBoundsException, for example—likely would occur. Make the game-board class more robust by handling any possible runtime exception that might occur, thus avoiding a program crash during play.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here