Here is example code showing a Tic Tac Toe class I made. It is more involved than I asked for in class, but it is fully operational and could be used in many situations.

TicTacToe.java can do the following:

Game.java does the following:

Example run:
calico(100)% java Game

Square 1 has a value: 2
Error, square value not set!

 X | O | X
---+---+---
 O | O | X
---+---+---
 X | X | O

This game is a Draw

Below is a blank board

   |   |  
---+---+---
   |   |  
---+---+---
   |   |