Class Totaliser
- Namespace
- Totaliser
- Assembly
- Project.dll
A class that maintains the sum of a given series of numbers.
public class Totaliser
- Inheritance
-
Totaliser
- Inherited Members
Properties
Sum
Returns the sum of the numbers entered since the last reset (or since construction).
public int Sum { get; }
Property Value
- int
the sum of the numbers entered since resetting
Methods
EnterValue(int)
Adds the given new value to the sum of the numbers.
public void EnterValue(int newValue)
Parameters
newValueintThe new value to add.
Reset()
Reset the sum to zero.
public void Reset()