1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
skad [1K]
4 years ago
9

Create a TicTacToe class that initializes a 3x3 board of "-" values. We will use this class in future exercises to fully build o

ut a Tic Tac Toe game! The TicTacToe class should have a 2D array as an instance variable and a constructor that initializes the 2D array with the "-" value. Add a getter method that returns the private 2D instance variable.
Computers and Technology
1 answer:
kap26 [50]4 years ago
8 0

Answer:

public class TicTacToe //Defining TicTacToe class

{

char board[3][3] ; //Creating a 2D array instance variable

TicTacToe() //Constructor to initialize the array with " - "

{

for( int i = 0;i<3;i++) //Loop for the row of array

{

for(int j = 0;j<3;j++) //Loop for the column of array

{

Board[i][j] = '-'; //Assigning "-" in each cell

}

}

}

public char getter() //Defining getter() method to return the array

{

return Board; //returning the array

}

}

You might be interested in
Which is better intel or amd real debate.
natima [27]

I believe Intel is better at handling games. Not saying AMD isn't good, just not as good. AMD is better for handling multiple task. I personally don't mind either.

8 0
3 years ago
Read 2 more answers
Even though the Pizza Hut corporation understood the need to make use of the Web, the franchise owners were skeptical. From an I
Gelneren [198K]

Answer:

Franchise owners are essential stakeholder group whose opinions are directly related to the company's success.

Explanation:

Franchise owners are essential stakeholder groups. A stakeholder is a person, organization, social group. A stakeholder can be internal or external to the business. Stakeholders affected by business and affect the business.

Different type of stakeholder is

  • Customer
  • Employees
  • Investors
  • Suppliers
  • Owners

Pizza Hut corporation owner is a stakeholder whose opinions are related to the company's success.

8 0
4 years ago
Brainliest
alekssr [168]

Answer:

fair credit reporting act

6 0
3 years ago
How many seconds are required to make a left turn and join traffic?​
Westkost [7]
In town: 5-8 seconds
On highways: 10-20 seconds
8 0
3 years ago
Read 2 more answers
To clarify a word while reading, a
Crazy boy [7]

Answer:

look up the word in the dictionary and break it down

Explanation:

4 0
3 years ago
Other questions:
  • Keion works as a freelancer creating websites and designing logos for clients. He recently had a hard drive failure and lost wor
    7·1 answer
  • "A switch passes data based on the MAC address."A. TrueB. False
    15·1 answer
  • A(n) _____ is someone who uncovers computer weaknesses and reveals them to manufacturers or system owners, without exploiting th
    15·1 answer
  • Three batch jobs, A through E, arrive at a computer center at almost the same time. They have estimated running times of 10, 6,
    6·1 answer
  • <img src="https://tex.z-dn.net/?f=%20%3Cmarquee%20behavior%3D%E2%80%9Dscroll%E2%80%9D%20direction%3D%E2%80%9Ddown%E2%80%9D%3EFol
    9·1 answer
  • what are examples of conditional formatting tools? check all that apply. color scales, icon sets,data bars,cell styles,themes
    8·1 answer
  • When memory allocation is ____, it means all portions of the program and OS are loaded into sequential locations in memory.
    15·1 answer
  • I NEED THIS ASAP
    12·2 answers
  • Which cable between Twisted-Pair-Cable (TPC) and Coaxial-Cable (CC) work for transmitting data to more distances?
    9·1 answer
  • You choose Option A for Overdraft Options. What would happen if you had $30 in your checking account and you tried to take out $
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!