Final answer:
The question involves implementing two constructors for a Java class representing time in military format. The default constructor initializes time to 00:00:00, and the parameterized constructor sets the time to the provided hour, minute, and second.
Step-by-step explanation:
The student is asking for the implementation of two constructors for a Time class in Java. The constructors will initialize the instance variables of the class, which represent military time.
The default constructor Time() sets the hour, minute, and second to zero. The parameterized constructor Time(int hr, int min, int sec) sets the hour, minute, and second to the values passed to the constructor.
Implementing Constructors:
public Time() {
this.hour = 0;
this.minute = 0;
this.second = 0;
}
public Time(int hr, int min, int sec) {
this.hour = hr;
this.minute = min;
this.second = sec;
}