Assignment 5

Due: Tuesday, October 25, 2005


Grading(Maximum Score 100):

For this assignment clarity is the key! Name your classes appropriately! Be as modular as you can! The initial score is based on the proper use of classes and object oriented concepts. Points will be taken off for not meeting all requirements. 5 points will be taken off for each class or method that does not have documentation! Documentation is defined as a written description of what the method or class does. This can be as short as a couple words or as long as a paragraph. Documentation MUST be in JavaDoc Format!

Detailed Grading

30% Organization of code!
20% Documentation
10% A socket was created connecting the two applications
10% Objects were passed across this connection
10% The receiving of network traffic does not block GUI Event processing
10% The server application draws the current game state correctly
10% The client application draws the current game state correctly

Overview:

This assignment will use threads, sockets, and the EventQueue(GUI) to control a moving image on a "remote" application.

Detail:

In this assignment you will create one application. It will be based off of your Assignment 4 code. This application will implement both client and server code. Additional GUI components must be added to your Assignment 4 to select either client or server for the current instance of the application. When running 2 instances of this application (one server and one client) the two displays will both display the action of the server's character on the screen.

The Base Application

My solution to Assignment 4 is available online if you would prefer to use that as a base for this assignment.

The Game State

If you haven't already done so, make a class that represents the current game state(position of the player and direction he is traveling.).

The Server:

The server will open a listening socket. When a "remote" application connects to the socket, the server will begin sending copies of the Game State Class to the client. Every time the game state is changed it should be sent to the client. The application must continue to draw the screen as it did in Assignment 4.

The Client

The client will open a socket to the server, and will be required to draw the current display based on the sent game state.

Hand In:

A print out of your code.
Screen shots of your frame. (Each OS handles this differently, but ALT-PrintScreen usually works to copy the image. Use paste to paste the image into a document...)

Hints

A Non Graphical version of this program still gets you a 70%... Build this first. Then get the graphics working!