The Java class TimeOfDay is incomplete, and your task is to bring it as close to completion as you can. To aid you in that, the Java application ToD_Tester is provided. Its purpose, as its name suggests, is to test the various features of TimeOfDay. (You are free to modify it in any way you see fit.) Another tool that can be used for testing is jGrasp's Workbench utility, as has been illustrated in lecture.
It is highly recommended that you take several minutes to study the source code of TimeOfDay in order to come to an understanding of how its features are implemented.
Once you have done that, you will be in a position to fill in the missing bodies of several "stubbed" methods, as described next. Note that it is not necessary for you to work on these in the same order that they are listed. Probably better would be to work your way from the easiest to the hardest, whatever that may be for you and your partner.
reports whether or not time lies in the interval of time starting at t1 and going to t2. This calculation is somewhat tricky in the case that midnight lies in that interval. For example, 3am is between 11pm and 8am.
Provided is the isEarlierThan() method. It would behoove you to use it in the isBetween() method.
When a TimeOfDay object is in 12-hour mode, its toString() method should produce a string describing the time in the traditional format, as in "8:45am" or "12:06pm". But if such an object is in 24-hour mode, its toString() method should produce a string in the form hh:mm, as in "09:37" or "19:02".
To implement this feature, it is necessary not only to modify the toString() method, but also to provide a means by which each TimeOfDay object is able to "remember" which mode it is in.