double IParcelRules.OverweightChargeRule(ShippingRate shippingRate) { if (_weight > shippingRate.WeightLimitKg) { return((_weight - shippingRate.WeightLimitKg) * shippingRate.OverweightChargePerKg); } return(0); }
private double CalculateOverweightCharge(ShippingRate shippingRate) { if (WeightKg > shippingRate.WeightLimitKg) { return((WeightKg - shippingRate.WeightLimitKg) * shippingRate.OverweightChargePerKg); } return(0); }