CS100J, Spring 2003, Assignment 3. Due on 21 February before midnight.


Purpose

This assignment gives you practice with writing functions whose bodies have assignment statements, conditional statements, and blocks.


Ground rules

You may work with one partner. If you are going to work with a partner, use the course management system to form a group BEFORE you submit the assignment. And we strongly suggest making the group at least three days before the assignment is due so that if you have problems, you can email us and get them solved. Contact Ashley Lin <acl20@cornell.edu> if you have problems.

This is (very, very roughly) a 10-hour assignment. Plan accordingly. Start early. Let's see how many people can subimit the proejct 3 days before the deadline.

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. You will both benefit from this, even if you find it feels like it is taking longer.


VITAL RULES

You must use the capitalization that we specify. You can ensure this by copying identifiers from this handout, rather than typing them yourself. You should also write precise specifications of your functions. The simplest way to do this is to copy-and-paste the specifications from this handout.


Class ProjectDates

You will create several functions in class ProjectDates. For each, you should write a short javadoc comment just before it that describes what the method is does.  As a reminder, javadoc comments look like these:

/** This class contains only static functions. There is no need to instantiate it.*/
public class X {
 
    /** Do ... (Write a COMMAND to do something --it is equivalent to a call on it*/
    public void m() {
        ...
    }

    /** =... (an English statement or formula that is equivalent to a function call on f*/
    public int f() {
        ...
    }
}

>

First, download file ProjectDates.java from the Course Management System and study its methods month, longerMonth, and numberOfdays. 

This assignment will be presented as a series of tasks. Finish each task completely before proceeding to the next. Test it carefully and thoroughly, using the Interactions Pane!

Here are the tasks:


What to submit

Use link http://cms.csuglab.cornell.edu/ to get on the course website and submit ProjectDates.java. Remember that, as always, the name of a file is derived from the class it contains and that correct capitalization is required.

Note: If you still need to be added to the CMS, email Ashley Lin <acl20@cornell.edu>.