public Automobile(string i_WheelProducer, float i_CurrentAirPressure, string i_ModelOfCar, string i_License, float i_FuelorElectricyAmount, eCarColor i_Color, eCountOfDoors i_NumberOfDoors) : base(i_WheelProducer, i_CurrentAirPressure, i_ModelOfCar, i_License, i_FuelorElectricyAmount, k_NumberOfWheels, m_FuelType, k_MaximalFuelCapacity, k_MaxWheelAirPressure) { m_CarColor = i_Color; eCountOfdoors = i_NumberOfDoors; }
public void TheChoiseOfUserIsAutomobile() { String ColorOfCar = String.Format(@"Please, type your color : 1: Green 2: Black 3: Red 4: Silver"); Console.WriteLine(ColorOfCar); eCarColor colorOfCar = (eCarColor)(Convert.ToInt32(Console.ReadLine())); Console.Clear(); String CountOfDoors = String.Format(@"Please, type your countOfDoors : 2: TwoDoors 3: TreeDoors 4: FourDoors 5: FiveDoors"); Console.WriteLine(ColorOfCar); eCountOfDoors countOfDoors = (eCountOfDoors)(Convert.ToInt32(Console.ReadLine())); Console.Clear(); Console.WriteLine("Please type your current fuel "); float currentAmountFuel = Convert.ToInt32(Console.ReadLine()); Console.Clear(); if (m_MyGarage.VehicleCollection.ContainsKey(m_LicenseNumber)) { Console.WriteLine("Auto exist in Garraje && in repairing !!!!"); m_MyGarage.VehicleCollection[m_LicenseNumber].EVecihleStates = eVecihleState.Repairing; } else { OwnerData AutomobileOwner = new OwnerData(m_ClientName, m_TelefonNumber, new Automobile(m_WheelManufacturer, m_CurrentPressure, m_ModelCar, m_LicenseNumber, currentAmountFuel, colorOfCar, countOfDoors)); m_MyGarage.AddVehicleToGarrage(m_LicenseNumber, AutomobileOwner); } }
public void TheChoiceOfUserIsElectricAutomobile() { float currentEnergyCharge = 0; String ColorOfCar = String.Format(@"Please, type your color : 1: Green 2: Black 3: Red 4: Silver"); Console.WriteLine(ColorOfCar); eCarColor colorOfCar = (eCarColor)(Convert.ToInt32(Console.ReadLine())); Console.Clear(); String CountOfDoors = String.Format(@"Please, type your countOfDoors : 2: TwoDoors 3: TreeDoors 4: FourDoors 5: FiveDoors"); Console.WriteLine(ColorOfCar); eCountOfDoors countOfDoors = (eCountOfDoors)(Convert.ToInt32(Console.ReadLine())); Console.Clear(); Console.WriteLine("Please type your current energy status in Hours , for example if you get 1/2 of hours type 0.5"); float.TryParse(Console.ReadLine(), out currentEnergyCharge); Console.Clear(); if (m_MyGarage.VehicleCollection.ContainsKey(m_LicenseNumber)) { Console.WriteLine("Auto exist in Garraje && in repairing !!!!"); m_MyGarage.VehicleCollection[m_LicenseNumber].EVecihleStates = eVecihleState.Repairing; } else { OwnerData ElectricAutomobileOwner = new OwnerData(m_ClientName, m_TelefonNumber, new ElectricAutomobile(m_WheelManufacturer, m_CurrentPressure, m_ModelCar, m_LicenseNumber, currentEnergyCharge, colorOfCar, countOfDoors)); m_MyGarage.AddVehicleToGarrage(m_LicenseNumber, ElectricAutomobileOwner); } }
public ElectricAutomobile(string i_WheelProducer, float i_CurrentAirPressure, string i_ModelOfCar, string i_License, float i_CurrentElectricyAmount, eCarColor i_CarColor, eCountOfDoors i_countOfDoors) : base(i_WheelProducer, i_CurrentAirPressure, i_ModelOfCar, i_License, i_CurrentElectricyAmount, k_NumberOfWheels, k_BattaryMaxCapacity, k_MaxWheelAirPressure) { eCountOfdoors = i_countOfDoors; eCarColor = i_CarColor; }