Exemple #1
0
        public void ChangeVehicleStatus(string i_inputLincesFromUser, string i_InputStatusFromUser) // this function change the vehicle status
        {
            Owner_Details owner;

            Vehicle.CheckLincesNumber(i_inputLincesFromUser);  // check if currect linces number
            owner = GetOwner(i_inputLincesFromUser);           // get the owner details through the linces number
            owner.UpdeateVehicleStatus(i_InputStatusFromUser); // call to function that updeate that vehicle status
        }
Exemple #2
0
        public void InflateVehicleAirTiresToTheMaximum(string i_inputFromUser) // this function inflate the wheels air to the maximum
        {
            Owner_Details owner;

            Vehicle.CheckLincesNumber(i_inputFromUser); // check if currect linces number
            owner = GetOwner(i_inputFromUser);          // get the owner details through the linces number
            owner.ownerVehicle.InflateAllWheelToMax();  // call to the function that inflate the air wheels to the vehicle
        }
Exemple #3
0
        public List <string> ShowFullDataOfVehicle(string i_inputLincesFromUser) // this function return a list of full data of a vehicle
        {
            Owner_Details owner;
            List <string> AllDetailsToPrint = NewObj.NewList();

            Vehicle.CheckLincesNumber(i_inputLincesFromUser);
            owner = GetOwner(i_inputLincesFromUser);
            owner.GetDetailesOwner(AllDetailsToPrint);
            return(AllDetailsToPrint);
        }
Exemple #4
0
        public void RechargeElectricVehicle(string i_inputLincesFromUser, string i_QuantityToFillFromUser) // this function check the inputs and charge the vehicle
        {
            float         minutesToChargeInFloat;
            Owner_Details owner;

            Vehicle.CheckLincesNumber(i_inputLincesFromUser);                               // check if currect linces number
            owner = GetOwner(i_inputLincesFromUser);                                        // get the owner details through the linces number
            CheckIfElectricEngine(owner);                                                   // check if its a electric vehicle
            minutesToChargeInFloat = CheckQuantityToFillFromUser(i_QuantityToFillFromUser); // check if the  minutes to charge unput is currect
            owner.ownerVehicle.engine.FuleVehicle(minutesToChargeInFloat);                  // call to fule function. throw Ex if the quantityToFill is too big
            owner.ownerVehicle.updateTheFualPrecent();                                      //update the precent fuel left
        }
Exemple #5
0
        public bool CheckIfLincesExicetAndTryToUpdate(string i_inputLincesFromUser) // this function checks if the vehicle exists in the system and updates its status to INPROCESS
        {
            Owner_Details ownerDetails;
            bool          notFound = true;

            Vehicle.CheckLincesNumber(i_inputLincesFromUser);

            if (m_vehicleCollection.TryGetValue(i_inputLincesFromUser, out ownerDetails))
            {
                notFound = false;
                ownerDetails.currentVehicleStatus = Owner_Details.eVehicleStatus.INPROCESS;
            }
            return(notFound);
        }
Exemple #6
0
        public void FuelVehicleThatPoweredByFuel(string i_inputLincesFromUser, string i_FualTypeFromUser, string i_QuantityToFillFromUser) // this function check the input for Fuel Vehicle That Powered By Fuel and fual
        {
            float         quantityToFillAtFloat;
            Owner_Details owner;

            Vehicle.CheckLincesNumber(i_inputLincesFromUser);                              // check if currect linces number
            owner = GetOwner(i_inputLincesFromUser);                                       // get the owner details through the linces number
            CheckIfGasolinEngine(owner);                                                   // check if its a gasolin vehicle
            ((Gasolin)(owner.ownerVehicle.engine)).CheckFuelType(i_FualTypeFromUser);      // check the fual type
            CheckFuleTypeOfVehicle(owner, i_FualTypeFromUser);                             // call to function that check if the input fual type is currect to the vehicle
            quantityToFillAtFloat = CheckQuantityToFillFromUser(i_QuantityToFillFromUser); // call to function that check if the  quantity input is currect
            owner.ownerVehicle.engine.FuleVehicle(quantityToFillAtFloat);                  // call to fule function. throw ex if the quantityToFill is too big
            owner.ownerVehicle.updateTheFualPrecent();                                     //update the precent fuel left
        }