tengo 3 clases en el paquete exercise12 ,me aparece un error en la clase testdriver y no se por que en las otras clases no tengo ningun error :
package exercise12;
public class TestDriver {
Time time1;
Time time2;
public static void main(String[] args) {
// compute the duration from 1:20:30 to 2:30:40
time1 = new Time(1, 20, 30);
time2 = new Time(2, 30, 40);
System.out.println("time1 = " + time1 + "\ntime2 = " + time2);
System.out.println("duration = " + time1.computeDuration(time2));
System.out.println();
// compute the duration from 1:45:10 to 2:30:05
time1 = new Time(1, 45, 10);
time2 = new Time(2, 30, 05);
System.out.println("time1 = " + time1 + "\ntime2 = " + time2);
System.out.println("duration = " + time1.computeDuration(time2));
System.out.println();
WorldTime worldTime1;
WorldTime worldTime2;
// compute the duration from 1:20:30 GMT+0 to 2:30:40 GMT+3
worldTime1 = new WorldTime(1, 20, 30, 0);
worldTime2 = new WorldTime(2, 30, 40, 3);
System.out.println("worldTime1 = " + worldTime1 + "\nworldTime2 = " + worldTime2);
System.out.println("duration = " + worldTime1.computeDuration(worldTime2));
System.out.println();
// compute the duration from 1:45:10 GMT+0 to 2:30:05 GMT+3
worldTime1 = new WorldTime(1, 45, 10, 0);
worldTime2 = new WorldTime(2, 30, 05, 3);
System.out.println("worldTime1 = " + worldTime1 + "\nworldTime2 = " + worldTime2);
System.out.println("duration = " + worldTime1.computeDuration(worldTime2));
}
}