Java program Write a program of a game of Tic-Tac-Toe that represents the board by using of 2D Array. Play the game 1 time for 2 players; Show who the winner is (Player 1, Player 2, or Draw) Name the program as TicTac.java, a possible screen output will look like following attachment

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter4: Financial Functions, Data Tables, And Amortization Schedules
Section: Chapter Questions
Problem 8AYK
icon
Related questions
Question

 

Java program
Write a program of a game of Tic-Tac-Toe that represents the board by using of 2D Array.
Play the game 1 time for 2 players;
Show who the winner is (Player 1, Player 2, or Draw)
Name the program as TicTac.java, a possible screen output will look like following attachment
E:\temp java\hw3>java TicTac
Welcome to playTicTacToe game! We have the following 3x3 empty board.
En ter the row index: 0
En ter
the column index:
: x :
Enter
Enter the column index:
row index: 0
1
: x : o :
the row index: 1
En ter he coluMn inde×:
1
: x : o : - :
: - : x :
En ter the row index: 0
En ter
the column index:
2
: x : o : o :
: - : x : - :
: - : - : - :
Enter
En ter
the row index: 2
the column index:
2
: x : o : o :
: - :x :
We have a winner ! Congrats!
E: \temp\java\hw3>
Transcribed Image Text:E:\temp java\hw3>java TicTac Welcome to playTicTacToe game! We have the following 3x3 empty board. En ter the row index: 0 En ter the column index: : x : Enter Enter the column index: row index: 0 1 : x : o : the row index: 1 En ter he coluMn inde×: 1 : x : o : - : : - : x : En ter the row index: 0 En ter the column index: 2 : x : o : o : : - : x : - : : - : - : - : Enter En ter the row index: 2 the column index: 2 : x : o : o : : - :x : We have a winner ! Congrats! E: \temp\java\hw3>
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT