32 lines
372 B
C++
Executable File
32 lines
372 B
C++
Executable File
#include "Counter.h"
|
|
#include <climits>
|
|
|
|
// Counter::Counter()
|
|
// {
|
|
// maxValue = INT_MAX;
|
|
// }
|
|
|
|
void Counter::setCount(int num)
|
|
{
|
|
value = num;
|
|
}
|
|
|
|
void Counter::increment()
|
|
{
|
|
++value;
|
|
}
|
|
|
|
void Counter::decrement()
|
|
{
|
|
--value;
|
|
}
|
|
|
|
int Counter::getCount()
|
|
{
|
|
return value;
|
|
}
|
|
|
|
int Counter::getMaxValue()
|
|
{
|
|
return maxValue;
|
|
} |