Exemplo n.º 1
0
        /*
         * Fills the battery of vehicle with given license plate number.
         */
        public void FillEnergySource(string i_LicensePlateNumber, float i_AmountToFill)
        {
            Vehicle vehicleToFillEnergySource = search(i_LicensePlateNumber);

            if (vehicleToFillEnergySource == null)
            {
                throw new VehicleNotInGarageException();
            }
            else
            {
                vehicleToFillEnergySource.FillEnergySource(i_AmountToFill);
            }
        }