Home

What's New

Course Overview

Adding & Dropping the Course

Academic Honesty

Reading Materials

Course Schedule

Assessment & Assignments

Computing

Assignment 1

A Java Chat Client

Due Monday, April 15, at the beginning of discussion. If you cannot attend discussion, then please make arrangements with Joe or Eric to drop the assignment off beforehand. This assignment contributes 6% toward your final course grade.

Summary

In this assignment you will write a Java program that provides users with an interface to a chat system. You should design your program in such a way that you'll be able to modify it easily for potential use in later assignments.

Chat Client Display

The display will contain the following parts:

  1. A registration pane containing the following elements: (1) a text box in which an email address is entered; (2) a visual indication of whether or not the client is currently registered with a chat controller; (3) a "Register" button that sends the email address to a chat controller; and (4) an "Exit" button that terminates the chat client.
  2. A text entry pane containing the following elements: (1) a text area in which chat text is entered; and (2) a "Send" button that sends the currently entered block of chat text and then clears the text field.
  3. A chat transcript pane that displays all text that is sent and received, with each text block prefixed by the email address of the chat client that produced it.

Since you haven't built a chat controller yet, the "Register" button should always succeed, in the sense that it causes the visual indicator in the registration pane to show that the client is currently registered. However, note that the visual indicator should not indicate an active registration when the client is first started. Additionally, the chat transcript pane should display only what is sent via the "Send" button in the text entry pane (since the chat client is interacting with no other chat clients yet).

Deliverables

You will turn in a report containing (1) a cover page listing your name, student ID, the course number and the assignment number; and (2) a source listing for all of the Java source code you wrote. You will also email to the TA a tar archive containing your source and executable files. The TA will further explain in discussion the process for doing this, but make sure your files are not otherwise publicly readable.

Your executable files should be properly packaged in an executable .jar file (Java Archive file). That is, the TA should be able to execute your chat program with the command line:

java -jar (filename).jar

The procedure for making an executable .jar file will be described by the TA in discussion.

In evaluating your work, 25% of the credit will be earned for quality of design, 25% for source code organization and documentation, and 50% for correct operation of the program.

Other Considerations

You may use any Java development environment you like to complete this assignment, however, the following rules must be followed:

1. You are not allowed to use any sort of GUI builder or code generator to assist you. All Java code should be written by you, by hand, in a text editor.

2. You may not use any proprietary widgets or graphics toolkits to implement this assignment. Swing (JFC) or AWT may be used. Swing is preferred, although AWT is acceptable. Everyone (and AWT users especially) should test their code on UNIX and Windows to ensure that it works equivalently on both platforms. The TA will be testing your code on a Windows platform.

If the TA is unable to run your code, then you will get a 'zero' on that portion of the assignment.

As with all of your work in this course, you should complete this assignment completely by yourself.


Copyright (C)2002 The Regents of the University of California. All Rights Reserved Worldwide.
Department of Information and Computer Science, University of California, Irvine.