In this assignment you will add error checking to the TicTacToe program of last week. Specifically, the program you have downloaded does not check if the person playing against the computer clicks on an spot that is already occupied. It simply lets the person do this, and the game is messed up. (Note that the computer does not have this foible).

The assignment is to make up an exception for this problem called In- validMoveException and implement it into the TicTacToeApplet. If this exception occurs, your applet should catch it, give an appropriate message, and ask the player to choose another spot. (In other words your applet should not just re-throw it.)

Some students in the class have already modified the TicTacToe program from a few weeks ago. Please work with this one anyhow, even if it is less advanced than what you ended up with, to make it easier for us to run. Also, note that the game is very slightly revised from a few weeks ago.


kamisama wechat