Question
Java programming Exercise 1: Tic-Tac-Toe Game (80 points) Please design and implement of a Tic-Tac-Toe game that can be played between 2 human players. Below
Java programming
Exercise 1: Tic-Tac-Toe Game (80 points) Please design and implement of a Tic-Tac-Toe game that can be played between 2 human players. Below is a sketchy structure of the Tic-Tac-Toe game enclosed in a TicTacToe class you may use. If you use this code structure, you still need to modify the code in this class and add more member methods to support all required functionality. You may also choose your own code structure to support all required functionality. Please provide java-doc comments for all member methods and classes that you use in your code. (4 points) Required functionality includes: (1) The game starts with prompting for input of players' names. (4 points) (2) Then the game prints an empty board. (2 points) (3) After that the game runs in a loop until a win or a draw. In each iteration, the game prompts for the 1st player's move, decides whether it is legal, and decides whether it leads to a win or draw. If the move is illegal, the game will ask for a move again. If the move leads to a win or draw, the game will print result information and terminate the loop. Otherwise, the game prompts for the 2nd player's move, and make the same decisions for this move.(70 points)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started