subject

Create a class TicTacToe. java 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 enum type to represent the value in each cell of the array. The enum'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. Write a program .java to play the game using the TicTacToe class. 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, 22.06.2019 06:00
Pthe price of tickets in a group when a purchased in bulk can be found with the equation c=px+24 were c is the cost, p is the number of people,and x is the price per ticket. what is price of of each ticket if it costs $189 to buy tickets for 15 people ? a $8 b $24c $9d $11 show work
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
What is the local portion of the e-mail address below? [email protected] a.) @ b.) biz c.) gumchewer d.) twrigley
Answers: 1
You know the right answer?
Create a class TicTacToe. java that will enable you to write a program to play Tic-Tac-Toe. The clas...
Questions
question
Chemistry, 14.01.2021 21:10
question
Mathematics, 14.01.2021 21:10
question
English, 14.01.2021 21:10
question
Mathematics, 14.01.2021 21:10
question
Mathematics, 14.01.2021 21:10
question
Mathematics, 14.01.2021 21:10
Questions on the website: 13722359