Пример #1
0
 private void addWheelsToVehicle(Wheel i_Wheel, byte i_NumofWheels)
 {
     for (byte i = 0; i < i_NumofWheels; i++)
     {
         Wheels.Add(i_Wheel.ShallowCopy());
     }
 }
Пример #2
0
 public Vehicle(string i_Model, string i_LicenseNumber, EnergySource i_EnergySourceType,
     byte i_NumOfWheels, Wheel i_Wheel)
 {
     r_Model = i_Model;
     r_LicenseNumber = i_LicenseNumber;
     m_EnergySourceType = i_EnergySourceType;
     m_energyPercentageLeft = CurrentEnergyPercentage();
     this.addWheelsToVehicle(i_Wheel, i_NumOfWheels);
 }
Пример #3
0
 public Truck(EnergySource i_EnergySource)
     : base(i_EnergySource)
 {
     Wheels = new Wheel[10];
 }
Пример #4
0
 public Motorcycle(string i_Model, string i_LicenseNumber, EnergySource i_EnergySourceType
     , byte i_NumOfWheels, Wheel i_Wheel)
     : base(i_Model, i_LicenseNumber, i_EnergySourceType, i_NumOfWheels, i_Wheel)
 {
 }
Пример #5
0
 public Motorcycle(EnergySource i_EnergySource)
     : base(i_EnergySource)
 {
     Wheels = new Wheel[2];
 }
Пример #6
0
 public void SetMaxAirPressureOfWheelInListOfWheels(float i_MaxAirPressureForEachWheel)
 {
     for (int i = 0; i < Wheels.Length; i++)
     {
         Wheels[i] = new Wheel(i_MaxAirPressureForEachWheel);
     }
 }
Пример #7
0
 public Car(EnergySource i_EnergySource)
     : base(i_EnergySource)
 {
     Wheels = new Wheel[4];
 }
Пример #8
0
 public Motorcycle(string i_Model, string i_LicenseNumber, EnergyType i_SourceOfEnergy, Wheel i_Wheel)
     : base(i_Model, i_LicenseNumber, i_SourceOfEnergy)
 {
     EnergySetup(i_SourceOfEnergy);
     AddWheels(i_Wheel, k_NumOfWheels, Wheel.eMaxAirPressure.Motorcycle);
 }
Пример #9
0
 public override void SetInfo(List <string> i_VehicleInfo)
 {
     base.SetInfo(i_VehicleInfo);
     m_WheelsList  = Wheel.SetWheels(i_VehicleInfo[4], i_VehicleInfo[5], k_MaxPsi, k_NumberOfWheels);
     m_LicenseType = checkLicenseType(i_VehicleInfo[6]);
 }
 protected void AddWheel(Wheel i_WheelToAdd)
 {
     Wheels.Add(i_WheelToAdd);
 }
Пример #11
0
 public List <Wheel> SetupWheels(int i_NumOfWheels, string i_Manufucture, float i_MaxPressure, float i_CurrentPressure)
 {
     return(Wheel.CreateWheelsSet(i_NumOfWheels, i_Manufucture, i_MaxPressure, i_CurrentPressure));
 }