Example #1
0
        private static void SwapPlacesOfMotorcycles(IMotorcycleDataStructure[] motorcycle, int it, int jit)
        {
            IMotorcycleDataStructure motorcycleAuxPlace = motorcycle[it];

            motorcycle[it]  = motorcycle[jit];
            motorcycle[jit] = motorcycleAuxPlace;
        }
 private static void OutputEachFieldOfMotorcycle(IMotorcycleDataStructure motorcycle)
 {
     Console.Write(motorcycle.GetBrandOfMotorcycle() + " ");
     Console.Write(motorcycle.GetModelOfMotorcycle() + " ");
     Console.Write(motorcycle.GetCapacityOfMotorcycle() + " ");
     Console.Write(motorcycle.GetTypeOfMotorcycle() + " ");
     Console.Write(motorcycle.GetMaxSpeedInStraightLineOfMotorcycle() + " ");
     Console.WriteLine(motorcycle.GetMaxSpeedInCurveOfMotorcycle());
 }
Example #3
0
        private double GetAverageSpeedOfMotorcycle(IMotorcycleDataStructure motorcycle)
        {
            int numberOfStraightLineParts = _inputOutputSystem.GetNumberOfStraightLinesInCircuit(_pathToCircuitFile);
            int numberOfCurveLineParts    = _inputOutputSystem.GetNumberOfCurvesInCircuit(_pathToCircuitFile);

            double result = numberOfStraightLineParts * motorcycle.GetMaxSpeedInStraightLineOfMotorcycle() +
                            numberOfCurveLineParts * motorcycle.GetMaxSpeedInCurveOfMotorcycle();

            return(result);
        }