This is a bit of an involved commit. In order to compute averages, we need to have stateful storage of the prior departure times. In order to keep storage down, I am just storing a running average and a count on a per boat and/or port basis. In this implementation the storage does not persist across restarts. In order to facilitate this in the future, I created a StorageManager class to allow us to modify the storage in the future.
Also added unit tests for the StorageManager and for the new average functions inside Utils.
This is a bit of an involved commit. In order to compute averages, we need to have stateful storage of the prior departure times. In order to keep storage down, I am just storing a running average and a count on a per boat and/or port basis. In this implementation the storage does not persist across restarts. In order to facilitate this in the future, I created a StorageManager class to allow us to modify the storage in the future.
Also added unit tests for the StorageManager and for the new average functions inside Utils.