Ejemplo n.º 1
0
        private static FuelMotorBike FuelMotorBikeInput(string licenseNumber, string vehicleModel)
        {
            float currentFuel = 0, maxFuel = 0;

            FuelInput(ref currentFuel, ref maxFuel);
            int licenseType = LicenseTypeInput();

            FuelMotorBike.eLicenseType license = (FuelMotorBike.eLicenseType)licenseType;
            Console.WriteLine("please enter your engine capacity");
            int           o_EngineCapcity = (int)GetLegalNumber();
            FuelMotorBike NewMotorBike    = new FuelMotorBike(vehicleModel, licenseNumber, currentFuel, maxFuel, FuelVehicle.eFuelType.Octan95, o_EngineCapcity, license);

            return(NewMotorBike);
        }
Ejemplo n.º 2
0
        public static MotorBike CreateMotorBike(eTypeOfVeichle i_TypeOfVeichile)
        {
            MotorBike motorBike = null;

            switch (i_TypeOfVeichile)
            {
            case eTypeOfVeichle.FuelMotorCycle:
                motorBike = new FuelMotorBike(s_FuelTypeForBike, s_MaxFuelForBike);
                break;

            case eTypeOfVeichle.ElectricMotorCycle:
                motorBike = new ElectricMotorBike(s_MaxTimeForBatteryForBike);
                break;
            }

            return(motorBike);
        }