public Vehicle(eTypeOfEnergy i_TypeOfEnergy, eFuelType i_FuelType, float i_FuelTankVolume, int i_NumOfTires, float i_MaxAirPressure) : this(i_TypeOfEnergy, i_NumOfTires, i_MaxAirPressure) { if (i_TypeOfEnergy == eTypeOfEnergy.Fuel) { r_EnergySystem = new FuelSystem(i_FuelTankVolume, i_FuelType); } else { throw new ArgumentException(); } }
public Vehicle(eTypeOfEnergy i_TypeOfEnergy, float i_MaxBatteryTime, int i_NumOfTires, float i_MaxAirPressure) : this(i_TypeOfEnergy, i_NumOfTires, i_MaxAirPressure) { if (i_TypeOfEnergy == eTypeOfEnergy.Electric) { r_EnergySystem = new ElectricSystem(i_MaxBatteryTime); r_TypeOfEnergy = eTypeOfEnergy.Electric; } else { throw new ArgumentException(); } }
public Vehicle(string i_ModelName, string i_LicenseNumber, eTypeOfEnergy i_TypeOfEnergy, eFuelType i_FuelType, float i_TankVolume) { if (i_TypeOfEnergy == eTypeOfEnergy.Fuel) { r_EnergySystem = new FuelSystem(i_TankVolume, i_FuelType); r_TypeOfEnergy = eTypeOfEnergy.Fuel; } else { throw new ArgumentException(); } m_ModelName = i_ModelName; m_LicenseNumber = i_LicenseNumber; }