#include "warning.h" warningCounter::warningCounter(int low, int hi) : limitedCounter(low, hi) { min = low; max = hi; } warningCounter::warningCounter(void) : limitedCounter() { min = 0; max = MAXV; } void warningCounter::count(void) { if (!isAtMax()) counter::count(); else cerr << " attempt to count over the boundary!\n"; } void warningCounter::unCount(void) { if (!isAtMin()) counter::unCount(); else cerr << " attempt to count over the boundary!\n"; }