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