subject

Create a class tictactoe that will enable you to write a program to play tic-tac-toe. the class contains a private 3-by-3 two-dimensional array. use an enumeration to represent the value in each cell of the array. the enumeration's constants should be named x, o and empty(for a position that does not contain an x or an o). the constructor should initialize the board elements to empty. allow two human players. wherever the first player moves, place an x in the specified square, and place an o wherever the second player moves. each move must be to an empty square. after each move, determine whether the game has been won and whether it's a draw.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:00
2.)how does a graphical user interface (gui) on a touchscreen interface differ from a gui on a desktop or laptop? a.)a finger or stylus is used instead of a pointer. b.) a magic wand is used instead of a pointer. c.)users speak commands instead of using a pointer. d.)users visualize commands instead of using a pointer.
Answers: 1
question
Computers and Technology, 22.06.2019 09:00
What is one way in which tablets differ from laptops and notebooks? tablets are designed for touch-based interaction. tablets are designed to be used as desktops. tablets are designed for input via a keyboard and mouse. tablets are designed to be larger than laptops.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
In which view can you see speaker notes?
Answers: 1
You know the right answer?
Create a class tictactoe that will enable you to write a program to play tic-tac-toe. the class cont...
Questions
question
Mathematics, 27.09.2019 01:10
question
English, 27.09.2019 01:10
question
Mathematics, 27.09.2019 01:10