Assignment 3

Chat Room

is due Thursday, March 30 (midnight)

Note: There is important information on this page about what to submit and what to put in your README files. Please read it, as it will make your projects much easier to grade.

Assignment overview

For this assignment you will write a client and server to implement a chat room. Both must be written in Java. The client must have a GUI, though a sample GUI is provided which you may use. More details can be found here.

Submissions

You should submit your assignment as a gzipped tar file. (See the man pages for tar and gzip.) To make the tar file, create a directory whose name is an abbreviation for the assignment name (for example, "ChatRoom"), copy all files you want to submit into that directory, tar it up, and gzip the tar file.

You should include all the source code needed to compile and run your program, except for jar files and such that are part of the course library (in a CPS 214 directory on cs or acpub). However, if we give you some source code, please submit it with your project to simplify the grading process. You should also include javadoc files for all your classes, and a README file conforming to the following standard:

README files

Please write a README file for each assignment in plain text (no HTML please) with lines no longer than 80 characters. (Try the M-q command in emacs.) Please include the following information:

No applets, please

Don't try to write applets for any of these assignments. There are security restrictions that prevent applets from making connections to machines other than the server they came from. Just write classes with main() functions instead.

Sample solution

A full solution to this assignment has been written. It is available here:
chatroom.tar.gz

You may run the executable classes and use them to test and debug your own code. You may also read the documentation for them. You are not allowed to use these example solutions in your own submissions or disassemble the class files. You are on your honor not to do so. This assignment includes source code for three files: ExitWhenClosed.java, Message.java, and SimpleUI.java. You may use these source files as you see fit: they work unmodified, but you may modify or even replace them if necessary.

The sample programs output more debugging information than necessary. This is to help you debug your own code. Your programs don't have to be that verbose.