Problem related to constructors and methods


Problem: In addition, the class should have the following constructors and methods:

1. A no-arg constructor that creates a default Timer object (The data fields hours, minutes, seconds are defaulted to 0).

2. A constructor that constructs a Timer object with three specified values for hours, minutes, and seconds.

3. Three public setter methods for the data fields hours, minutes and seconds.

4. Three public getter methods for the data fields hours, minutes and seconds. In the second constructor and three setter methods above, make sure that the three data fields are greater than or equal to 0. e.g., if the value used to set the data field hours is negative, you should then set hours to 0 instead.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Problem related to constructors and methods
Reference No:- TGS03252223

Expected delivery within 24 Hours