Пример #1
0
        public void AddCar(string newMake, string newModel, string newYear)
        {
            Car newCar = new Car();

            newCar.NewCar(newMake, newModel, newYear);

            ParkingSpots.Add(newCar);
        }
Пример #2
0
        public bool AddParkingSpot(ParkingSpot parkingSpot)
        {
            if (parkingSpot == null)
            {
                throw new ArgumentNullException("parkingSpot");
            }

            if (FindParkingSpot(parkingSpot.ID) == null)
            {
                ParkingSpots.Add(parkingSpot);
                return(true);
            }
            return(false);
        }
Пример #3
0
 public void ParkInSpot(ParkingSpot parkingSpot) => ParkingSpots.Add(parkingSpot);