public class Main {

    public static void main(String[] args) {
	// write your code here
        Time classBegin = new Time(11, 30);
        Time classEnd = new Time(12, 19, 59);

        if (classBegin.isEarlyThan(classEnd)) {
            System.out.println("No Error Detected.");
        }
        else {
            System.out.println("The begin time must be earlier than the ending time.");
        }

        Time classLast = new Time();
        classLast = Time.duration(classBegin, classEnd);
        System.out.print("Class CSCI 221 lasts ");
        classLast.printTime();


    }
}
