/test-numbers

Test Numbers

Primary LanguageJava

test-numbers

TEST TASK

Create a thing that can be offered numbers.

At any given time it can tell 3 things:

  1. the smallest number it has encountered so far
  2. the largest number it has encountered so far
  3. the average of all numbers it has encountered so far

Prove that it is working correctly. Make it so that a novice programmer cannot use it the wrong way, nor that an evil programmer can break it.