Example 6: second implementationof Date ADT (1)
public class Date implements DateADT{ // Each Date value is a past, present, or future date.
// This date is represented by a day-in-epoch number d // (where 0 represents 1 January 2000): private int d;
public Date (int y, int m, int d) { // Construct a date with year y, month m, and day-in-month d. …; this.d = …; }