package week12day3;

public class AlarmClock {
	private int numTimesSnoozed = 0;
	private static int UPPER_LIMIT = 10;
	
	public void snooze() throws Exception{
		numTimesSnoozed++;
		if(numTimesSnoozed==UPPER_LIMIT){
			numTimesSnoozed = 0;
			throw new Exception("Time to get up!");
		}
	}
	
	public void stop(){
		numTimesSnoozed = 0;
	}
}
