CostCalculator class + associated test class