Modify the CalendarDate class from this chapter to include a year field, and modify its compareTo method

Question:

Modify the CalendarDate class from this chapter to include a year field, and modify its compareTo method to take years into account when making comparisons. Years take precedence over months, which take precedence over days. For example, July 18, 1995, comes beforeMarch 2, 2001.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: