// tests ClockTime class. public class ClockTimeTest { // Print s public static void show(String s) { System.out.println(s); } // Empty constructor public ClockTimeTest() {} // runs all tests public void runTests(){ ClockTime ct1 = new ClockTime(10,10); ClockTimeTest.show(ct1.toString()); ClockTime ct2 = new ClockTime(0,59); ClockTimeTest.show(ct2.toString()); ClockTime ct3 = new ClockTime(3,44); ClockTimeTest.show(ct3.toString()); ClockTime ct4 = new ClockTime(22,0); ClockTimeTest.show(ct4.toString()); //ClockTime ct5 = new ClockTime(-1,0); // throws an exception ClockTime ct5 = new ClockTime(5,77); // throws an exception } public static void main(String[] argv){ ClockTimeTest cTimeTest = new ClockTimeTest(); cTimeTest.runTests(); } }