I don't quite understand the codes above. I mean I know what it means, but I don't know details. So comparable is an interface here. I don't really know what interface does? Just provides more methods for the class? My teacher said if interface is comparable, there must be a compareTo method --public int compareTo(Object obj) Object is a super class that contains many objects, but why we need that here? (Object obj)?
Line 23, What does this statement mean? (Lecture) is casting? what is 'other'?
Line 24, Is the 'other' here same as the above? But how does the program know which end time is other, which end time is this??
For this program, user gives input of start time and end time. For example, 9.10(means 9.10 am)-10.23(means 10:23 am).
Line 15-19, I know what toString method does, but why we need it here? Why we need to convert double Starttime and end time to
string? And plus, I didn't use variable description in later classes. Thanks for helping out.