public AirConditioner(TemperatureSensor temperatureSensor, decimal minCoolingTemperature) { MinCoolingTemperature = minCoolingTemperature; _temperatureSensor = temperatureSensor; _temperatureSensor.AddListener(this); }
public Heater(TemperatureSensor temperatureSensor, decimal maxHeatingTemperature) { MaxHeatingTemperature = maxHeatingTemperature; _temperatureSensor = temperatureSensor; _temperatureSensor.AddListener(this); }