first semester files
This commit is contained in:
32
1st-Semester-Fall-2021/CSNP/ClassesLesson/Counter.cpp
Executable file
32
1st-Semester-Fall-2021/CSNP/ClassesLesson/Counter.cpp
Executable file
@@ -0,0 +1,32 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user