CS100J, Fall 2003, Assignment 1. Due on 16 September before midnight.


About submitting assignments

In this course, we will be using an electronic submission system developed by the CS department. As soon as possible --which means NOW-- please bring up this page in your browser. http://cms.csuglab.cornell.edu/ . You will probably asked for your Cornell id and password (using Kerberos). When you give them correctly and hit "enter", the Computer Science Course Management System home page will appear in your browser. To the right, you should see the link "Courses CS100J FA03". If it is there, that means you are entered into the course list, and you shouldn't have problems submitting the first assignment later. If the link is not there, that means that you are not in our course list! You should immediately email ... <...@cornell.edu>, explaining that you are taking the course and want to be registered to submit assignments. Do this NOW --don't wait until it is time to submit the first assignment.


Purpose

Write several JFrame subclasses (customizations) in order to practice with writing classes, methods, method calls (including the use of arguments and parameters), and expressions. We will have taught all the material required for this assignment by the end of week 2.


Ground rules

You may work with one partner. If you do, get on the course management system several days before the assignment is due and follow directions for telling the system who your partner will be. Don't wait until the last minute to do this; do it several days before you want to submit the assignment.

This is (very, very roughly) a 10-hour assignment. Plan accordingly.

Plan to spend as much as an hour reading this handout so that you thoroughly understand what we are asking for. Do this with your partner before you start programming!

We strongly, strongly suggest that you and your partner alternate writing the classes (but with the other person watching and helping). You will both benefit from this, even if you find it feels like it is taking longer.


VITAL RULES

Here are some very specific rules that you must follow. If you break any of these, you will automatically get a zero on part or all this assignment.

  1. You must use the capitalization that we specify. You can ensure this by copying identifiers from this handout, rather than typing them yourself.
  2. You may not use the word static anywhere in assignment 1.
  3. You may not use loops or if-statements.
  4. Every method and class must be marked public, and every instance variable must be marked private.
  5. Do not use System.out.println or System.out.print in any class that you write.

Subclasses of JFrame

You will write several subclasses of JFrame. Here are the sources of help that you can use, in no particular order: the course textbooks, your lecture notes, your programming partner, the course website, the Java APIs, the consultants in Carpenter, the TAs, and the instructor.

You should write a short javadoc comment at the top of each class that describes what the class is for. You should write a comment for each method. As a reminder, javadoc comments look like these:

    /** this is a javadoc comment for class X */
public class X {

/** this is a javadoc comment for method m.
Put a blank line before me. */
public void m() {
}
}

The comment on a method MUST be a specification of the method. It should follow the guidelines given in Sec. 13.3.1 of the text. Also, use the specifications shown in Sec. 2.1 as examples. One way to get the specification is simply to copy it from the material below.

Here are the five subclasses that you should write:

Note: Windows apparently has a minimum width of 112 pixels. Even if you do j.setSize(0, 0);, the width is 112. You don't need to fix this, and you will not be penalized for this.


What to submit

Use link http://cms.csuglab.cornell.edu/ to get on the course website and submit the following five files.