#ifndef baseCounterHPP #define baseCounterHPP #include class BaseCounter { protected: int counter; int max; explicit BaseCounter(int theMaxValue) : counter(0), max(theMaxValue) {} BaseCounter(int theCounter, int theMaxValue) : counter(theCounter), max(theMaxValue) {} public: int getCounter() const { return counter; } int getMax() const { return max; } void reset() { counter = 0; } void print() const { std::cout << counter << "/" << max << std::endl; } }; #endif