updated Alarm.java to answer Problem III in Proj1