Application Kata „Alarm Clock“
Implement an application with which one can be woken.
One can either give the time of the alarm or the rest period until the alarm time.
The application shows the current time accurate to the second. If an alarm was set it additionally shows the remaining time until the alarm will ring. The alarm can be set either by entering the alarm time or a period until the alarm should ring. Afterwards the start button has to be clicked.
If the alarm time is reached the program plays a sound from the given file alarm.wav (or alarm.mp3). Furthermore the alarm clock will be stopped.
The alarm clock can be stopped before the alarm time by clicking the stop button. If the alarm is stopped the remaining time is not displayed anymore.
Variation #1
The sound file is played in a loop until clicking the stop button stops the alarm clock.