/** * Adds the given number of seconds to this object (modifier). */ public void increment(double seconds) { this.second += seconds; while (this.second >= 60.0) { this.second -= 60.0; this.minute += 1; } while (this.minute >= 60) { this.minute -= 60; this.hour += 1; } }