- 3
Consider the following java class definition: public class time { private int second; // from 1 to 60
private int minute; // from 1 to 60 private int hour; // from 0 to 23 public void decrease (); // move to previous second } a) Implement a constructor that initialises new. objects of time class to be set to the 22:45:00. b) Implement setters for second, minute and hour c) Implement the increase method, which moves to the next second, ensuring that all data members are updated appropriately
1 Antwort
0
Are we supposed to do your homework?