public class TimeC { // instance data private int hours, min; // hours and minutes since midnight // constructor ... // returns hours since midnight public int getHour() { return hours ;} // returns minutes (over hours) since midnight public int getMin() { return min; } // resets the time to midnight public void reset() { ... } // s.compareTo(t) returns -1 if s is earlier in the day than t, // 0, if they are equal, and // 1, if s is later in the day than t public int compareTo(TimeC t) { ... } }