A program that performs calculations on a series of integers.
make -- Build the calculation engine.
make all -- Synonymous with make.
make clean -- Delete all binaries and object files.
make test -- Build and run unit tests.
./build/calc engine_name files...
./build/calc engine_name integers...
Input files contain one or more lines of integers, each separated by whitespace.
The abstract class Engine
represents a stateful computation engine. Each engine in the project
must derive from this, and implement the two member functions.
Engines follow a function-object style, for easy interoperability with the standard algorithms library.
void operator()(Integer value)
Update the current state of the engine with the given value.
Integer value()
Return the current state of the engine. If the engine has not been updated through operator()
,
this should return a sensible default value.