Ejemplo n.º 1
0
        /// <summary>
        /// Return the concrete shipping vehicle
        /// </summary>
        /// <param name="deliveryHours"></param>
        /// <returns></returns>
        internal override IShippingVehicle GetShippingVehicle(DeliverySpeedEnum deliverySpeed)
        {
            switch (deliverySpeed)
            {
            case DeliverySpeedEnum.Fast:
                return(new Car());

            case DeliverySpeedEnum.Normal:
                return(new Bike());

            default:
                return(null);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Return the shipping vehicle
 /// </summary>
 /// <param name="deliveryHours"></param>
 /// <returns></returns>
 internal abstract IShippingVehicle GetShippingVehicle(DeliverySpeedEnum deliverySpeed);