Assignment #5

Due Midnight, Wednesday Nov. 20, 1996

Implement the following program in JAVA:
NOTE: This is similar to assignment 4 but using JAVA instead of C.
Note also that I gave 3 weeks instead of the traditional 2 weeks to do this assignment.
This will give you more time to master and learn JAVA.

NAME

TTT - Tic Tac Toe game for two persons

SYNOPSIS

TTT [HostName] PortNumber

DESCRIPTION

If a person (the first player) invokes the program with only one arguemnet (PortNumber), the program behaves as a server. When another person (the second player) invokes the program with two arguements (HostName and PortNumber), the program behaves as a client and establishes a TCP connection with the first player.

Upon the establishment of the TCP connection a Tic-Tac-Toe board of 3x3 entries appears on each of the two displays. The program lets the client play first then it strictly alternates between the client and server until the game is over with either a winner or a tie.

When the game is over, the program displays a dialogue widget to each user with a message area containing:

"You are the winner (loser)" Or "No winner, it is a tie"
"Would you like to play another game?"


and two buttons labeled "YES" and "NO".

If both users clicks on YES, another game is played. In this case, the person who played first last game will play second If any user clicks on NO, the program terminates.


Back to Assignments Page
Back to CS476/576 Home Page