public class Counter {
        int value = 0;
        int topValue = 5;
        public int increment() throws CounterException {
		if (value >= topValue) 
			throw (new CounterException("Counter Exceeded"));
                value ++;
                return value;
        }
        public int getValue() {
                return value;
        }
}


