What does “equal” mean? (cont.)
nTo determine if they are “equal” dates, we must compare their day, month, and year.
npublic boolean equals (Object obj){
n  Require.condition(obj
n instanceof Date);
n  Date d = (Date)obj;
n return this.year()==d.year() &&
n     this.month()==d.month() &&
n this.day()==d.day();
n}
n// instanceof returns true if the object is
n// an instance of
n// the class