Consider the following java class definition: public class time { private int second; // from 1 to 60 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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

22nd Dec 2016, 5:38 AM
victor
1 Answer
0
Are we supposed to do your homework?
16th Jan 2017, 10:32 PM
Jannick