private void addNewVehicleToTheGarage() { VehicleCreation.eVehicleTypes vehicleType; float weelCurrentAirPressureFromUser; string vehicleLicenceNumberFromUser, vehicleModelNameFromUser, weelManufacturerNameFromUser, vehicleOwnerNameFromUser, vehicleOwnerPhoneNumber, currentEnergyPercentage; vehicleLicenceNumberFromUser = getAndCheckVehicleLicenceNumber(); vehicleModelNameFromUser = getVehicleModelName(); vehicleType = getVehicleType(); weelManufacturerNameFromUser = getWeelManufacturerName(); weelCurrentAirPressureFromUser = getWeelCurrentAirPressure(vehicleType); vehicleOwnerNameFromUser = getVehicleOwnerName(); vehicleOwnerPhoneNumber = getVehicleOwnerPhoneNumber(); string firstVehicleValue, secondVehicleValue; getTwoAdditionValuesAccordingToVehicleType(out firstVehicleValue, out secondVehicleValue, vehicleType); currentEnergyPercentage = getCurrentEnergyPercentageOFVehicle(vehicleType); VehicleGarage.InsertNewVehicleToGarage(vehicleType, vehicleModelNameFromUser, vehicleLicenceNumberFromUser, weelManufacturerNameFromUser, weelCurrentAirPressureFromUser, firstVehicleValue, secondVehicleValue, vehicleOwnerNameFromUser, vehicleOwnerPhoneNumber); VehicleGarage.UpdateVehicleCurrentEnergy(vehicleLicenceNumberFromUser, currentEnergyPercentage); Console.WriteLine("########## The required vehicle was added successfully to the garage:)))))) ##########"); }
private void displayAllSpecificVehicleDetailsInTheGarage() { string strInputVehicleLicenceNumber; getTheVehicleLicenceNumber(out strInputVehicleLicenceNumber); Console.WriteLine(VehicleGarage.PrintAllDictionaryDetails(strInputVehicleLicenceNumber)); }
private void changeVehicleStatusInGarage() { const bool v_ChangeVehicleStatusInTheGarage = true; string strInputVehicleLicenceNumber, vehicleStatusYouWantToChange; getTheVehicleLicenceNumber(out strInputVehicleLicenceNumber); getTheVehicleStatusYouWantToChange(out vehicleStatusYouWantToChange); if (VehicleGarage.ChangeVehicleStatusInTheGarage(strInputVehicleLicenceNumber, (Vehicle.eVehicleStatusInGarage)Enum.Parse(typeof(Vehicle.eVehicleStatusInGarage), vehicleStatusYouWantToChange)) == v_ChangeVehicleStatusInTheGarage) { Console.WriteLine("######### The vehicle status was changed successfully :))))))) #########"); } }
private void inflateVehicleWheelToMax() { string strInputVehicleLicenceNumber; const bool v_VehicleExistInGarage = true; getTheVehicleLicenceNumber(out strInputVehicleLicenceNumber); if (VehicleGarage.CheckIfVehicleExistInGarage(strInputVehicleLicenceNumber) == v_VehicleExistInGarage) { VehicleGarage.InflateTheVehicleWheelsToMax(strInputVehicleLicenceNumber); Console.WriteLine("########## Vehicle Wheels was inflated to max successfully :)))))))) ##########"); } else { Console.WriteLine("########## No vehicle licence number in the garage !!! ##########"); } }
private void chargeElectricVehicle() { string strInputVehicleLicenceNumber; const bool v_VehicleExistInGarage = true; const bool v_ItIsGasolineVehicle = true; string strInputBatteryTimeInHours; getTheVehicleLicenceNumber(out strInputVehicleLicenceNumber); if (VehicleGarage.CheckIfVehicleExistInGarage(strInputVehicleLicenceNumber) == v_VehicleExistInGarage && VehicleGarage.CheckIfElectricVehicle(strInputVehicleLicenceNumber) == v_ItIsGasolineVehicle) { chooseTimeToChargeBattery(out strInputBatteryTimeInHours); VehicleGarage.ChargeElectricVehicle(strInputVehicleLicenceNumber, strInputBatteryTimeInHours); Console.WriteLine("########## Battery Charge for required vehicle was successfully :)))))))) ##########"); } else { Console.WriteLine("########## No vehicle licence number in the garage or it's not an electric vehicle !!! ##########"); } }
private void fillFuelToGasolineVehicle() { string strInputVehicleLicenceNumber; const bool v_VehicleExistInGarage = true; const bool v_ItIsGasolineVehicle = true; string strFuelTypeChoise, strInputFuelQuantity; getTheVehicleLicenceNumber(out strInputVehicleLicenceNumber); if (VehicleGarage.CheckIfVehicleExistInGarage(strInputVehicleLicenceNumber) == v_VehicleExistInGarage && VehicleGarage.CheckIfElectricVehicle(strInputVehicleLicenceNumber) != v_ItIsGasolineVehicle) { chooseFuelTypeToFill(out strFuelTypeChoise); chooseFuelQuantityToFill(out strInputFuelQuantity); VehicleGarage.FuelGasolineVehicle(strInputVehicleLicenceNumber, strFuelTypeChoise, strInputFuelQuantity); Console.WriteLine("########## Filling fuel for required vehicle was successfully :)))))))) ##########"); } else { Console.WriteLine("########## No vehicle licence number in the garage or it's an electric vehicle !!! ##########"); } }
private void displayAllVehiclesLicenseNumbersFilteredByStatusInGarage() { VehicleGarage.PrintAllVehiclesIdNumbersInGarage(); }