Question: in java Create public class named CountdownTimer to represent a countdown timer. You should provide a constructor accepting a single int, which you should assert
in java
Create public class named CountdownTimer to represent a countdown timer. You should provide a constructor accepting a single int, which you should assert is greater than 0 . That sets the timer. Then, provide two instance methods. reset takes no arguments and resets the timer to the initial value passed to the constructor. It does not return a value. down takes no arguments, decrements the timer, and returns true if the timer has reached zero and false otherwise. Once the timer reaches zero, additional calls to down should continue to return true. Here's how your class should work: Your class should not expose any of its internal state publicly
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
