subject

Write a program in Java following these pseudocode:

class ticTacToe

{

public:

void play();

//Function to start the play……x /O keep playing …. getXOMove

void displayBoard() const;

//Function to print the board.

bool isValidMove(int x, int y) const;

//Function to determine if a move is valid.

bool getXOMove(char moveSymbol);

//Function to get a move for a player…read row col..check it displayboard…check game status..count nbof moves

status gameStatus();

//Function to determine the current status of the game.

void reStart();

//Function to restart the game.

ticTacToe();

//Default constructor.

//Postcondition: Initializes the board to an empty state.

private:

char board[3][3];

int noOfMoves;

};

//

int main()

{

ticTacToe game;

game. play();

return 0;

}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:30
Which tab is used to change the theme of a photo album slide show? a. design b. view c. transitions d. home
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
How can smart devices benefit businesses, organizations, and social communities in the global marketplace?
Answers: 1
You know the right answer?
Write a program in Java following these pseudocode:

class ticTacToe

{
<...
Questions
question
Mathematics, 20.10.2020 01:01
question
Physics, 20.10.2020 01:01
question
Mathematics, 20.10.2020 01:01
question
Mathematics, 20.10.2020 01:01
Questions on the website: 13722367