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.
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.
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:
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:
- The full name and email address of each team member, plus
the names of anyone you collaborated with
- The date and time of your submission
- The name of the assignment
- How to compile your code (What to put in the
CLASSPATH, what files need to be compiled, etc.)
- How to run each executable required by the assignment (What
command line options it takes, what environment variables it
uses, how to set up any configuration files, default values
for various options, etc.)
- A list of what works and what doesn't
- A summary of your design
- Any stumbling blocks or difficulties you ran into
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.
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.