CMPU 102 - Assignment 2 Due: by the beginning of class (noon) on September 15

This assignment is a review of primitive Java and classes/objects.

Implement a class called "Date" to represent a calendar date.  Here is the source file you should use as the starting point: Date.java.  You can also start working from an Eclipse project: assign2eclipse.zip.  (Instructions for loading a project into the Eclipse workspace can be found in the instructions for Lab 1.)

You will need to delete all of the statements that read:
throw new UnsupportedOperationException("TODO");
since those are just placeholders.

The methods you must implement are:

You will need to handle leap years.  Use the following rules to determine whether or not a particular year is a leap year:

All years evenly divisible by 4 are leap years, except years which are evenly divisible by 100 and not evenly divisible by 400.
For example, the year 2000 was a leap year, even though it is evenly divisible by 100, because it also evenly divisible by 400.

Submitting your solution

To submit your solution, email it to me before the start of class on the 13th.  Please send it as an email attachment if possible.  My contact information is on my web page, http://www.cs.vassar.edu/~hovemeye.