Digital Clock +int hour +int min +int sec + String ampm +Digital Clock() +Digital Clock(h:int, m:int, s:int, ap:String) +setHour(h:int): void +setMin(m:int)): void +setSec(s:int) ): void +setAMPM (ap:String): void +setTime(h:int, m:int, s:int, ap:String): void +getTime(): String +tick():void public class ClockTest { public static void main(String[] args) { //Test the constructors DigitalClock clockOne = new DigitalClock(); DigitalClock clockTwo = new DigitalClock (11, 58, 30, "AM"); System.out.println("Clock System.out.println("Clock One reads: "+clockOne.getTime()); Two reads: "+clockTwo.getTime()); //Test the set methods clockOne.setHour (55); //Invalid hour clockOne.setMin (75); //Invalid minutes clockOne.setSec (85); //Invalid seconds clockOne.setAMPM("BlahBlah"); //invalid //Time should be unchanged System.out.println("Clock One reads: "+clockOne.getTime()); clockOne.setTime (8, 45, 52, "PM"); //Test the set time method with valid data, which also calls the individual set methods //time should now be changed System.out.println("Clock One reads: "+clockOne.getTime()); //Use a loop to test the tick() method on clock two for (int i=0; i < 5000; i++) { clockTwo.tick(); System.out.println(clockTwo.getTime());