Beispiel #1
0
 public Motorcycle(int i_EngineVolume, eMotorcycleLicenseType i_LicenseType, List <Tire> i_Tires, Powersource i_Powersource, string i_LicensePlate, string i_ModelName) : base(i_LicensePlate, i_ModelName)
 {
     m_Powersource       = i_Powersource;
     m_Tires             = i_Tires;
     r_EngineVolume      = i_EngineVolume;
     r_MotorcycleLicense = i_LicenseType;
 }
Beispiel #2
0
 public Motorcycle(eMotorcycleLicenseType i_MotorcycleLicenseType, int i_EngineCapacity, string i_VehicleNumber, string i_VehicleModel,
                   int i_NumberOfWheels, string i_WheelManufacturerName, float i_MaxAllowedAirPressure)
     : base(i_VehicleNumber, i_VehicleModel, i_NumberOfWheels, i_WheelManufacturerName, i_MaxAllowedAirPressure)
 {
     this.r_MotorcycleLicennseType = i_MotorcycleLicenseType;
     this.m_EngineCapacity         = i_EngineCapacity;
 }
Beispiel #3
0
        public void TrySetLicenseType(string inputtedLicenseType)
        {
            int  selectedLicenseType;
            bool validSelectedLicenseType = int.TryParse(inputtedLicenseType, out selectedLicenseType);

            if (!validSelectedLicenseType)
            {
                throw new FormatException("MotorcycleLicenseType");
            }
            else if (selectedLicenseType < 1 || selectedLicenseType > 4)
            {
                throw new ValueOutOfRangeException("LicenseType", 1, 4);
            }

            m_LicenseType = (eMotorcycleLicenseType)selectedLicenseType;
        }
Beispiel #4
0
 public GasMotorcycle(float i_MaximumFuelCapacity, FuelTank.eFuelType i_FuelType, eMotorcycleLicenseType i_MotorcycleLicenseType,
                      int i_EngineCapacity, string i_VehicleNumber, string i_VehicleModel,
                      int i_NumberOfWheels, string i_WheelManufacturerName, float i_MaxAllowedAirPressure)
     : base(i_MotorcycleLicenseType, i_EngineCapacity, i_VehicleNumber, i_VehicleModel, i_NumberOfWheels, i_WheelManufacturerName, i_MaxAllowedAirPressure)
 {
     this.m_FuelTank   = new FuelTank(i_MaximumFuelCapacity, i_FuelType);
     this.m_EngineType = eVehicleEngineType.GasEngine;
 }
Beispiel #5
0
 public Motorcycle(List <object> i_InputParamsFromUser) : base(i_InputParamsFromUser, k_AmountOfTires, k_MotorcycleWheelsMaximalAirPressure)
 {
     this.r_EngineVolume = (int)i_InputParamsFromUser[4];
     this.r_LicenseType  = (eMotorcycleLicenseType)i_InputParamsFromUser[5];
 }