public Motorcycle(eLicense i_license, int i_engineVolume, VehicleInformation i_vehicleInformation, string i_wheelManufacturer) : base(i_vehicleInformation) { m_license = i_license; m_engineVolume = i_engineVolume; m_wheelInformation = new WheelInformation(32, 2, i_wheelManufacturer); base.WheelInformation = m_wheelInformation; }
public FuelMotorcicle(string i_WheelProducer, float i_CurrentAirPressure, string i_ModelOfCar, string i_License, float i_CurrentFuel, int i_EngineSize, eLicense i_LicenseType) : base(i_WheelProducer, i_CurrentAirPressure, i_ModelOfCar, i_License, i_CurrentFuel, k_NumberOfWheels, m_FuelType, k_MaximalFuelCapacity, k_MaxWheelAirPressure) { eLicenseType = i_LicenseType; m_EngineSize = i_EngineSize; }
public Bike(string i_ModelOfCar, string i_License, int i_FuelElectricyAmount, int i_EngineSize, eLicense i_TypeLicense) : base(i_ModelOfCar, i_License, i_FuelElectricyAmount, k_NumberOfWheels) { m_EngineSize = i_EngineSize; //eLicenseType = (eLicense)Enum.Parse(typeof(eLicense), Convert.ToString(i_TypeLicense)); eLicenseType = i_TypeLicense; for (int i = 0; i < k_NumberOfWheels; i++) { m_SetOfWheels[i].MaximalAirPressure = k_MaxWheelAirPressure; } }
public void TheChoiseOfUserIsFuelBike() { float currentAmountFuel = 0; int engineCapacityFuelBike = 0; Console.WriteLine("Please, type current engine capacity of Bike"); try { engineCapacityFuelBike = Convert.ToInt32(Console.ReadLine()); } catch (FormatException i_Error) { Console.WriteLine(i_Error); Console.ReadKey(); } Console.Clear(); String LicenseTypeOfFuelByke = String.Format(@"Please, type your license : 1: A1 2: AA 3: AB 4: C"); Console.WriteLine(LicenseTypeOfFuelByke); eLicense fuelBikeLicense = (eLicense)(Convert.ToInt32(Console.ReadLine())); Console.Clear(); Console.WriteLine("Please type your current fuel "); try { float.TryParse(Console.ReadLine(), out currentAmountFuel); } catch (FormatException i_Error) { Console.WriteLine(i_Error.Message); Console.ReadKey(); } Console.Clear(); if (m_MyGarage.VehicleCollection.ContainsKey(m_LicenseNumber)) { Console.WriteLine("FuelAuto exist in Garraje && in repairing !!!!"); m_MyGarage.VehicleCollection[m_LicenseNumber].EVecihleStates = eVecihleState.Repairing; } else { OwnerData fuelBikeOwner = new OwnerData(m_ClientName, m_TelefonNumber, new FuelMotorcicle(m_WheelManufacturer, m_CurrentPressure, m_ModelCar, m_LicenseNumber, currentAmountFuel, engineCapacityFuelBike, fuelBikeLicense)); m_MyGarage.AddVehicleToGarrage(m_LicenseNumber, fuelBikeOwner); } }
public ElectricMotorcycle(string i_ModelName, string i_LicenseNumber, float i_EnergyLeft, eLicense i_LicenseType, int i_EngineVolume) : base(i_ModelName, i_LicenseNumber, i_EnergyLeft) { Battery = new Battery(1.2f); GasVehicle = false; this.licenseType = i_LicenseType; this.engineVolume = i_EngineVolume; Battery.TimeLeft = EnergyLeft * Battery.TimeCapacity; for (int i = 0; i < 2; i++) { Wheels.Add(new Wheel(30)); } }
public Motorcycle(string i_ModelName, string i_LicenseNumber, float i_EnergyLeft, eLicense i_LicenseType, int i_EngineVolume) : base(i_ModelName, i_LicenseNumber, i_EnergyLeft) { this.licenseType = i_LicenseType; this.engineVolume = i_EngineVolume; GasVehicle = true; GasTank = new GasTank(eGasType.Octan95, 7); GasTank.CurrentAmount = EnergyLeft * GasTank.MaxCapacity; for (int i = 0; i < 2; i++) { Wheels.Add(new Wheel(30)); } }
public void GetMotorcycleDetailsFromUser(out eLicense io_Lisence, out int io_EngineVolume) { string engineVolumeStr; Console.Write("Enter engine volume :"); engineVolumeStr = Console.ReadLine(); while (int.TryParse(engineVolumeStr, out io_EngineVolume) && io_EngineVolume < 1) { Console.Write("Wrong input. Enter engine volume :"); engineVolumeStr = Console.ReadLine(); } Console.WriteLine("Select license :"); Console.WriteLine(@"--------------------------- 1. A 2. A1 3. AA 4. B 5. Cancel and return to main menu ----------------------------- Enter your choice : "); io_Lisence = (eLicense)(getUsersInput(1, 5) % 5); }
protected internal MotorCycle(List <Wheel> i_Wheels, string i_PlateNumber, string i_Manufacture, float i_EnergyPercentage, IEngine i_Engine, int mEngineVolume, eLicense mLicenseType) : base(i_Wheels, i_PlateNumber, i_Manufacture, i_EnergyPercentage, i_Engine) { m_EngineVolume = mEngineVolume; m_LicenseType = mLicenseType; }
public Bike(eLicense i_RequiredLicense, int i_EngineVolume) { m_RequiredLicense = i_RequiredLicense; m_EngineVolume = i_EngineVolume; }
public MotorCycle(string i_OwnerName, string i_OwnerPhoneNumber, string i_LPN, string i_Model, eLicense i_License, float i_EngineVolume) : base(i_LPN, i_OwnerName, i_OwnerPhoneNumber, i_Model) { License = i_License; EngineVolume = i_EngineVolume; }
public ElectricMotorcicle(string i_WheelProducer, float i_CurrentAirPressure, string i_ModelOfCar, string i_License, float i_CurrentElectricyAmount, eLicense i_eLicenseType, int i_EngineSize) : base(i_WheelProducer, i_CurrentAirPressure, i_ModelOfCar, i_License, i_CurrentElectricyAmount, k_NumberOfWheels, k_BattaryMaxCapacity, k_MaxWheelAirPressure) { m_EngineSize = i_EngineSize; eLicenseType = i_eLicenseType; }
public void ReciveNewFueledMotorcycle(string i_OwnerName, string i_OwnerPhoneNumber, string i_LPN, string i_Model, float i_CurrentPressure, string i_ManufactureName, float i_AmountOfEnergy, eLicense i_License, int i_EngineVolume) { m_VehicleGenerator.AddNewMotor(i_CurrentPressure, i_OwnerName, i_OwnerPhoneNumber, i_LPN, i_Model, i_AmountOfEnergy, i_ManufactureName, i_License, i_EngineVolume, eEnergyType.Fueled, eFuelType.Octan95); }
public ElectricMotorcycle(eLicense i_license, int i_engineVolume, VehicleInformation i_vehicleInformation, string i_wheelManufacturer) : base(i_license, i_engineVolume, i_vehicleInformation, i_wheelManufacturer) { m_ElectricEngine = new ElectricEngine(m_MaxEngineOperateHours, 0); // i_vehicleInformation.VehicleType = VehicleInformation.eVehicleType.ElectricMotorcycle; }
public FuelBasedMotorcycle(eLicense i_license, int i_engineVolume, VehicleInformation i_vehicleInformation, string i_wheelManufacturer) : base(i_license, i_engineVolume, i_vehicleInformation, i_wheelManufacturer) { m_fuelEngine = new FuelEngine(m_MaxFuelAmountLiters, 0, FuelEngine.eFuelType.Octane96); //i_vehicleInformation.VehicleType = VehicleInformation.eVehicleType.FuelBasedMotorcycle; }