public void SetCarToParking(CarSubject car) { if (_parkingPlaces > 1) { this.cars.Add(car); _parkingPlaces--; NotifyObserversAboutParkingPlaces(); } }
public void RemoveCarfromParking(CarSubject car) { this.cars.Remove(car); NotifyObserversAboutParkingPlaces(); _parkingPlaces++; }