public Truck(string i_ModelName, string i_LicenseNumber, float i_RemainingPowerSupply, PowerSource.ePowerSupply i_PowerSupply, string i_ManufacturerName) : base(i_ModelName, i_LicenseNumber, i_RemainingPowerSupply, i_PowerSupply) { for (int i = 0; i < k_NumberOfWheels; i++) { Wheels.Add(new Wheel(i_ManufacturerName, (float)Wheel.eMaxTierAirPressure.Truck)); } }
public Truck(string i_ModelName, string i_LicensePlate, string i_ManufacturerName, float i_CurrentAirPressure, float i_CurrentEnergyAmount) : base(i_ModelName, i_LicensePlate, EngineType.eEnergySource.Fuel) { for (int i = 0; i < k_NumberOfWheels; i++) { Wheels.Add(new Wheel(i_ManufacturerName, (float)Wheel.eMaxAirPressure.Truck, i_CurrentAirPressure)); } SetEnergy(i_CurrentEnergyAmount); }
public Truck(string i_LicenseNumber, string i_ModelName, string i_WheelManufacturerName, EnergySource.eSource i_energySource) : base(i_ModelName, i_LicenseNumber, i_energySource) { for (int i = 0; i < k_QuantityOfWheels; i++) { Wheels.Add(new Wheel(i_WheelManufacturerName, (float)Wheel.eMaxAirPressure.Truck)); } SetEnergySource(); }
public Motorcycle(string i_LicensePlate, string i_ModelName, string i_WheelManufacturer, EnergySource.eSource i_Source) : base(i_LicensePlate, i_ModelName, i_Source) { for (int i = 0; i < k_AmountOfWheels; i++) { Wheels.Add(new Wheel(i_WheelManufacturer, (float)Wheel.eMaxAirPressure.Motorcycle)); } InitializeEnergySource(); }
public Truck(string i_ModelName, string i_LicenseNumber, string i_WheelManufactur, EnergySource.eSourceType i_EnergySource) : base(i_ModelName, i_LicenseNumber, i_EnergySource) { for (int i = 0; i < k_AmountOfWheels; i++) { Wheels.Add(new Wheel(i_WheelManufactur, (float)Wheel.eMaxAirPressure.Truck)); } InitEnergySource(); }
private void setWheels(string i_WheelManufacturName, float i_WheelsCurrentAirPressurePrecentage, float i_MaxAirPressure, int i_NumberOfWheels) { Wheel newWheel; float currentAirPressure = i_MaxAirPressure * i_WheelsCurrentAirPressurePrecentage / 100; for (int i = 0; i < i_NumberOfWheels; i++) { newWheel = new Wheel(i_WheelManufacturName, currentAirPressure, i_MaxAirPressure); Wheels.Add(newWheel); } }
protected void InitializeWheelsList( string i_Manufacturer, eNumberOfWheels i_NumberOfWheels, Wheel.eMaxAirPressure i_MaxAirPressure, float i_CurrentAirPressure) { m_Wheels = new List <Wheel>(); for (int i = 0; i < (int)i_NumberOfWheels; i++) { Wheels.Add(new Wheel((float)i_MaxAirPressure, i_CurrentAirPressure, i_Manufacturer)); } }
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 Truck(string i_ModelName, string i_LicenseNumber, float i_EnergyLeft, bool i_DangerousSubstances, float i_TrunkCapacity) : base(i_ModelName, i_LicenseNumber, i_EnergyLeft) { GasVehicle = true; this.dangerousSubstances = i_DangerousSubstances; this.trunkCapacity = i_TrunkCapacity; GasTank = new GasTank(eGasType.Soler, 120); GasTank.CurrentAmount = EnergyLeft * GasTank.MaxCapacity; for (int i = 0; i < 16; i++) { Wheels.Add(new Wheel(28)); } }
internal void AddWheels(int i_MaxWheelPressure) { for (int i = 0; i < NumOfWheels; i++) { Wheels.Add(new Wheel(i_MaxWheelPressure)); m_MemberInfoStr.Add(string.Format( "{0} wheel's manufacturer", i + 1)); m_MemberInfoStr.Add(string.Format( "current air pressure in wheel {0}", i + 1)); } }
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 ElectricCar(string i_ModelName, string i_LicensePlate, float i_EnergyLeft, eColor i_CarColor, eDoorsAmount i_AmountOfDoors) : base(i_ModelName, i_LicensePlate, i_EnergyLeft) { GasVehicle = false; this.carColor = i_CarColor; this.amountOfDoors = i_AmountOfDoors; Battery = new Battery(2.1f); Battery.TimeLeft = EnergyLeft * Battery.TimeCapacity; for (int i = 0; i < 4; i++) { Wheels.Add(new Wheel(32)); } }
public override void FulfillVehicleDetails(VehicleEntranceForm i_VehicleEntranceForm) { Model = i_VehicleEntranceForm.VehicleModel; m_TruckTrunkCooling = i_VehicleEntranceForm.IsTruckTrunkCool; m_TrunkCapacity = i_VehicleEntranceForm.TruckTrunkCapacity; Engine = new GasolineEngine(k_TruckFuelType, i_VehicleEntranceForm.CurrentFuelAmount, k_TruckVolumeOfFuelTank); for (int i = 0; i < k_NumberOfWheelsInTruck; i++) { Wheel WheelToAdd = new Wheel( i_VehicleEntranceForm.WheelManufacturer, i_VehicleEntranceForm.WheelCurrentAirPressure, k_MaximumAirPressure); Wheels.Add(WheelToAdd); } }
public Car(string i_ModelName, string i_LicensePlate, float i_EnergyLeft, eColor i_CarColor, eDoorsAmount i_AmountOfDoors) : base(i_ModelName, i_LicensePlate, i_EnergyLeft) { Dictionary <string, string> extraData = new Dictionary <string, string>(); extraData.Add("Color", i_CarColor.ToString()); extraData.Add("Number of doors", i_AmountOfDoors.ToString()); ExtraTypeData = extraData; GasTank = new GasTank(eGasType.Octan96, 60); GasVehicle = true; this.color = i_CarColor; GasTank.CurrentAmount = EnergyLeft * GasTank.MaxCapacity; this.amountOfDoors = i_AmountOfDoors; for (int i = 0; i < 4; i++) { Wheels.Add(new Wheel(32)); } }
public override void FulfillVehicleDetails(VehicleEntranceForm i_VehicleEntranceForm) { Model = i_VehicleEntranceForm.VehicleModel; m_LicenseType = i_VehicleEntranceForm.MotorcycleLicenseType; m_EngineCapacity = i_VehicleEntranceForm.MotorcycleEngineCapacity; if (i_VehicleEntranceForm.VehicleType == VehicleFactory.eVehicleType.ElectricMotorcycle) { Engine = new ElectricEngine(i_VehicleEntranceForm.RemainingBatteryHours, k_MaximumBatteryLifeHours); } else { Engine = new GasolineEngine(k_MotorcycleFuelType, i_VehicleEntranceForm.CurrentFuelAmount, k_MotorcycleVolumeOfFuelTank); } for (int i = 0; i < k_NumberOfWheelsInMotorcycle; i++) { Wheel WheelToAdd = new Wheel( i_VehicleEntranceForm.WheelManufacturer, i_VehicleEntranceForm.WheelCurrentAirPressure, k_MaximumAirPressure); Wheels.Add(WheelToAdd); } }