示例#1
0
 public TaxiBooker()
 {
     configurationManager = new ConfigurationManager("Ola", 30, 5);
     taxi = configurationManager.TaxiType();
     distanceTravelled = new DistanceTravelled(6);
     costCalculator    = configurationManager.GetCostCalculator();
 }
示例#2
0
        public int CalculatingCost(DistanceTravelled distanceTravelled)
        {
            int cost = distanceTravelled.distanceInKilometer * perKilometerCost;

            if (cost < minimumCost)
            {
                return(minimumCost);
            }
            return(cost);
        }