|
home—info—exams—lectures—labs—hws
Recipe—Laws—lies—syntax—java.lang docs—java.util docs
For checking off, you need to complete the previous lab, and do one of the following two problems. (However, either one would be fair game for the exam! The second one is a bit more difficult.)
/** Do two dates represent the exact same day? * @param other The date to compare this Date against. * @return true if (and only if) this Date represents the same day as other. * (that is, the same year, month, day-of-month). */ boolean isEqualTo(Date other) |
/** Does one Date precede another? * @param other The date to compare this Date against. * @return true if (and only if) this Date comes before other. */ boolean isBefore(Date other) |
Since this method takes in an object as a parameter, you'll presumably want to review a similar program from yesterday's lecture.
/** Return the day after `this`. (`this` must be a valid date.) * @return the day after `this`. The result will be valid if `this` is valid. */ Date nextDay() { return new Day(1,1,1); // A dummy stub function. } |
home—info—exams—lectures—labs—hws
Recipe—Laws—lies—syntax—java.lang docs—java.util docs
©2007, Ian Barland, Radford University Last modified 2007.Sep.28 (Fri) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |