Exemplo n.º 1
0
        private Car CreateNormalCar(string i_VehicleModel, string i_LicensePlate, string i_WheelManufacturer, float i_CurentAirPreasure, float i_CurrentEnergy)
        {
            FuelEngine.eFuelType fuelType          = FuelEngine.eFuelType.Octan98;
            const float          k_MaxTankCapacity = 42f;
            FuelEngine           fuelEngine        = new FuelEngine(fuelType, k_MaxTankCapacity);

            fuelEngine.FuelAddition(fuelType, i_CurrentEnergy);
            Car car = CreateCar(i_VehicleModel, i_LicensePlate, i_WheelManufacturer, fuelEngine, i_CurentAirPreasure);

            return(car);
        }
Exemplo n.º 2
0
        private Motorcycle CreateNormalMotorcycle(string i_VehicleModel, string i_LicensePlate, string i_WheelManufacturer, float i_CurentAirPreasure, float i_CurrentEnergy)
        {
            FuelEngine.eFuelType fuelType          = FuelEngine.eFuelType.Octan95;
            const float          k_maxTankCapacity = 5.5f;
            FuelEngine           fuelEngine        = new FuelEngine(fuelType, k_maxTankCapacity);

            fuelEngine.FuelAddition(fuelType, i_CurrentEnergy);
            Motorcycle motorcycle = CreateMotorcycle(i_VehicleModel, i_LicensePlate, i_WheelManufacturer, fuelEngine, i_CurentAirPreasure);

            return(motorcycle);
        }
Exemplo n.º 3
0
        private Truck CreateTruck(string i_VehicleModel, string i_LicensePlate, string i_WheelManufacturer, float i_CurentAirPressure, float i_CurrentEnergy)
        {
            FuelEngine.eFuelType fuelTypeForTruck      = FuelEngine.eFuelType.Octan96;
            const float          k_MaximumTankCapacity = 135f;

            Wheel[] wheels = new Wheel[k_NumberOfWheelsForTruck];
            for (int i = 0; i < k_NumberOfWheelsForTruck; i++)
            {
                wheels[i] = new Wheel(i_WheelManufacturer, k_mMximumAirPressureForTruck);
                wheels[i].WheelInflation(i_CurentAirPressure);
            }

            FuelEngine fuelEngine = new FuelEngine(fuelTypeForTruck, k_MaximumTankCapacity);

            fuelEngine.FuelAddition(fuelTypeForTruck, i_CurrentEnergy);
            Truck newTruck = new Truck(i_VehicleModel, i_LicensePlate, wheels, fuelEngine);

            return(newTruck);
        }