berth
Class CostCalculator

java.lang.Object
  extended byberth.CostCalculator

public class CostCalculator
extends java.lang.Object

Class with functionality for calculating cost Contain different methods for calculations, which functionality is shared among other external entities


Constructor Summary
CostCalculator()
          Empty constructor
 
Method Summary
 int calculateCost(TimePoint arrivalTime, Duration durationOfCharging, Ship ship)
          Method that calculate cost for a ship and a duration
 int calculateDuration(TimePoint startTime, Duration duration)
          Method that convert a duration into number of hours
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CostCalculator

public CostCalculator()
Empty constructor

Method Detail

calculateCost

public int calculateCost(TimePoint arrivalTime,
                         Duration durationOfCharging,
                         Ship ship)
Method that calculate cost for a ship and a duration


calculateDuration

public int calculateDuration(TimePoint startTime,
                             Duration duration)
Method that convert a duration into number of hours

Returns:
int