/* WarningCounter.java ** Java class that extends BoundedCounter by providing concrete versions of ** incrementFromMax() and decrementFromMin(). The intended behavior of each ** of these two is to throw an exception! ** ** Author: R. McCloskey */ public class WarningCounter extends BoundedCounter { // constructors // ------------ /* Initializes this WarningCounter so that its range of possible ** count values is [min..max] and its initial count value is init. ** ** pre: min <= init <= max */ public WarningCounter(int init, int min, int max) { super(init, min, max); } /* Initializes this WarningCounter so that its range of possible ** count values is [min..max] and its initial count value is min. ** ** pre: min <= max */ public WarningCounter(int min, int max) { this(min, min, max); } // mutators (concrete versions of abstract methods in parent class) // -------- /* Throws a RuntimeException that provides a relevant message. */ @Override protected void incrementFromMax() { // STUB! } /* Throws a RuntimeException that provides a relevant message. */ @Override protected void decrementFromMin() { // STUB! } }