// // TimeDriver: simple operations to exercise Time // public class TimeDriver { public static void main(String[] args) { Time clock = new Time(); clock.set(7, 58); System.out.print("Start time: "); clock.display(); System.out.println(); clock.advance(); System.out.print("1 minute later: "); clock.display(); System.out.println(); clock.advance(); System.out.print("Yet another minute later: "); clock.display(); System.out.println(); Time fast_clock = new Time(); fast_clock.set(7, 57); for(int tick = 0; tick < 5; tick++) { fast_clock.advance(); fast_clock.advance(); clock.advance(); System.out.println("Slow: " + clock.toString() + "; fast: " + fast_clock.toString()); } // now advance just the regular clock by several hours for(int tick = 0; tick < 235; tick++) clock.advance(); System.out.println("Final clock after 3 more hrs and 55 min: " + clock.toString()); } }