Ejemplo n.º 1
0
        public static Double GetTotalConsumption(this ITransportationDeviceKind device, IGasKind gazKind, Double KmDistance)
        {
            var starting = device.GetStartingConsumption(gazKind);
            var average  = device.GetAverageConsumption(gazKind, KmDistance);

            return(Math.Round(starting + average, 2));
        }
Ejemplo n.º 2
0
 public static double GetAverageCoefficient(this ITransportationDeviceKind device, IGasKind gasKind)
 {
     return(Math.Round(device.Weight *
                       device.EngineFactor *
                       gasKind.GasConsumptionCoefficient *
                       device.KmsHourSpeedAverage, 2));
 }
Ejemplo n.º 3
0
 public static double GetStartingCoefficient(this ITransportationDeviceKind device)
 {
     return(Math.Round(device.Weight
                       * device.StartingEffort
                       * device.KmsHourSpeedAverage
                       * device.EngineFactor
                       * device.RequiredStartingDistance, 2));
 }
Ejemplo n.º 4
0
 public static Double GetStartingConsumption(this ITransportationDeviceKind device, IGasKind gazKind)
 {
     return(device.GetStartingCoefficient() * gazKind.GasConsumptionCoefficient);
 }
Ejemplo n.º 5
0
 public static Double GetAverageConsumption(this ITransportationDeviceKind device, IGasKind gasKind, Double KmDistance)
 {
     return(device.GetAverageCoefficient(gasKind) * KmDistance);
 }