public void AddEnergyToVehicle(string i_LicenseNumber, float i_AmountOfEnergyToAdd, Motor.eFuelType i_FuelType = 0) { Vehicle desiredVehicle = getVehicleByLicenseNumber(i_LicenseNumber); if (desiredVehicle.Equals(null)) { throw new KeyNotFoundException(k_VehicleNotFoundMessage); } desiredVehicle.AddEnergyToMotor(i_AmountOfEnergyToAdd, i_FuelType); }
public void ChangeVehicleStatus(string i_LicenseNumber, Customer.eVehicleStatusInTheGarage i_NewVehicleStatus) { Vehicle desiredVehicle = getVehicleByLicenseNumber(i_LicenseNumber); if (desiredVehicle.Equals(null)) { throw new KeyNotFoundException(k_VehicleNotFoundMessage); } r_GarageDataBase[desiredVehicle].VehicleStatusInTheGarage = i_NewVehicleStatus; }
public void InflateAllVehicleWheelsToMax(string i_LicenseNumber) { Vehicle desiredVehicle = getVehicleByLicenseNumber(i_LicenseNumber); if (desiredVehicle.Equals(null)) { throw new KeyNotFoundException(k_VehicleNotFoundMessage); } desiredVehicle.InflateAllWheelsToMaxAirPressure(); }
public string ShowVehicleFullData(string i_LicenseNumber) { Vehicle desiredVehicle = getVehicleByLicenseNumber(i_LicenseNumber); if (desiredVehicle.Equals(null)) { throw new KeyNotFoundException(k_VehicleNotFoundMessage); } StringBuilder vehicleDataBuilder = new StringBuilder(); vehicleDataBuilder.AppendFormat("{0}{1}", Environment.NewLine, desiredVehicle.ToString()); return(vehicleDataBuilder.ToString()); }