public HeatIndexDisplay(WeatherData weatherData) { this.weatherData = weatherData; weatherData.RegisterObserver(this); }
public StatisticsDisplay(WeatherData weatherData) { this.weatherData = weatherData; weatherData.RegisterObserver(this); }
/** * 构造函数 * @param weatherData */ public CurrentConditionsDisplay(WeatherData weatherData) { this.weatherData = weatherData; weatherData.RegisterObserver(this); }