Here's a class named Time with three fields: hours, minutes and seconds.
Add three constructors to the class:
- The first one takes only
hoursand initializes this field; - The second one takes
hoursandminutesand initializes the corresponding fields; - The third one takes
hours,minutesandsecondsand initializes all fields.
Do not make the fields and constructors private.