/* Directions: Below is the Clock class. You need to make a subclass called PreciseClock that represents a clock with hours, minutes, AND seconds. You should have three constructors. It should also have setters and getters for the seconds property. You should also make sure that all inhereted methods work as intended. For example, the following code should work in a Driver class with a main method: PreciseClock a = new PreciseClock(10, 20, 30); System.out.println(a); //Should print: 10:20.30 PreciseClock b = new PreciseClock(a); System.out.println(b); //Should print: 10:20.30 PreciseClock c = new PreciseClock(10, 20, 0); System.out.println(a.equals(c)); //Should print: false PreciseClock d = new PreciseClock(5, 5, 5); System.out.println(d); //Should print: 5:05.05 d.setSeconds(40); System.out.println(d); //Should print: 5:05.40 */ public class Clock { private int hours; private int minutes; public Clock() { hours = 0; minutes = 0; } public Clock(int h, int m) { hours = h; minutes = m; } public Clock(Clock other) { hours = other.hours; minutes = other.minutes; } public void setHours(int h) { hours = h; } public void setMinutes(int m) { minutes = m; } public int getHours() { return hours; } public int getMinutes() { return minutes; } public boolean equals(Object o) { Clock other = (Clock)o; return minutes == other.minutes && hours == other.hours; } public String toString() { if(minutes < 10) return hours + ":0" + minutes; else return hours + ":" + minutes; } }