static void Main(string[] args) { var order = new Order { ShippingMethod = ShippingOptions.FedEx, Origin = new Address(), Destination = new Address() }; var calculatorService = new ShippingCostCalculatorService(new FedexShippingStrategy()); Console.WriteLine(calculatorService.CalculateShippingCost(order)); }
public double Calculate(Order order) { return 5.00d; }
public double Calculate(Order order) { return 4.25d; }
public double CalculateShippingCost(Order order) { return _shippingStrategy.Calculate(order); }