A simple class to test. More...
#include <Calculator.h>
Public Member Functions | |
Calculator (int in_base) | |
Construct the object. | |
int | add (int num) |
Add a value. | |
int | sub (int num) |
Subtract a value. |
A simple class to test.
The class is constructed with a value which serves as a base for different calculations.
Definition at line 25 of file Calculator.h.
Calculator::Calculator | ( | int | in_base | ) | [inline] |
Construct the object.
in_base | the base value for all calculations |
Definition at line 32 of file Calculator.h.
int Calculator::add | ( | int | num | ) | [inline] |
Add a value.
num | value to add |
Definition at line 40 of file Calculator.h.
References global_error.
Referenced by Calculator_test::test_add().
int Calculator::sub | ( | int | num | ) | [inline] |
Subtract a value.
num | value to subtract |
Definition at line 49 of file Calculator.h.
References global_error.
Referenced by Calculator_test::test_sub().