Specify design and implement a class that can be one player


Question: Specify, design, and implement a class that can be one player in a game of tic-toc-toe. The constructor should be specify whether the object is to be the first player (X's) or the second player (O's).

There should be a member function to ask the object to make its next move, and a member function that tells the object what the opponent's next move is. Also include other useful member functions, such as a function to ask whether a given spot of the tic-toc-toe board is occupied, and if so, whether the occupation is with an X or an O.

Also, include a member function to determine when the game is over, and where was draw, an X win, or an O win.

Use the class in two programs: a program that plays tic-toc-toe against the program's user, and  a program that has two tic-toc-toe objects that play against each other.

You need to implement this class and you have to satisfy the requirements specific in the instruction.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Specify design and implement a class that can be one player
Reference No:- TGS0951385

Expected delivery within 24 Hours