These are the two files you will be updating

There are modifications to this assignment so please read carefully. First, and have been provided. These are the two files you will be updating. (Do not confuse this with java.util.Date). You also have a test file,
Since this class is written with Date as a separate class, you will need to modify it to test Date as an inner class of Person. There are several places in the code that are commented with // ITP 220. These comments indicate methods you must complete for this
assignment. The problem description states that the Date class should be made private. I would like to give you the option of making this class public or private. Rather than focusing on which would be easier to implement, I would like you to think about whether
this inner class makes more sense as a public or private inner class. For instance, can a Date exist and be validated on its own without any references to Person? Are there some methods that may only be valid if the Person attributes are accessible? These
are the types of questions to ask when deciding whether to make the inner class public or private. In addition to doing that and what the problem description states for project #8 on page 738 (or 757 in the 2nd edition), I also want you to implement the Comparable
interface for the Date class. The Date class already includes precedes( ) and equals( ). Person will also implement Cloneable. You could make use of these methods (and should). Be very aware of testing for null Objects and reusing methods that already exist
(do not create additional constructors). I also have provided the beginnings of code for testing, Modify this class to include testing for the Comparable interface. You should test for all three states: less than, equals, and greater than.
When you are done, you should have two files, (which will include an instance of the inner class Date) and the test file, Zip these into a single file and submit. When are you finished with this assignment, you will use these
same files to complete the week 4 assignment. It is not necessary to wait for this assignment to be graded to begin on the week 4 assignment (it would be a good idea, but I do not want to hold you up from progressing at your own pace).
Powered by