Exemplo n.º 1
0
        public Dictionary <string, string> AddVehicle(int i_VehicleType, string i_ModelName, bool i_IsElectric, string i_LicensePlateNumber, string i_OwnerName, string i_OwnerPhoneNumber)
        {
            Vehicle newVehicle = null;
            Dictionary <string, string> specialFeatursDictionary = null;
            Owner vehicleOwner;

            if (ExistsInGarage(i_LicensePlateNumber))
            {
                ChangeState(i_LicensePlateNumber, eState.Fixing);
            }
            else
            {
                vehicleOwner = new Owner(i_OwnerName, i_OwnerPhoneNumber);
                newVehicle   = VehicleGenerator.AddVehicle(i_VehicleType, i_ModelName, i_IsElectric, i_LicensePlateNumber, vehicleOwner);
                this.m_FixingVehiclesInGarage.Add(newVehicle.LicensePlateNumber, newVehicle);
                specialFeatursDictionary = newVehicle.GetSpecialFeatursDictionary();
            }

            return(specialFeatursDictionary);
        }