static void Main(string[] args) { Console.WriteLine("Hello World!"); WeatherData weatherData = new WeatherData(); DisplayOne display_one = new DisplayOne(weatherData); DisplayTwo display_two = new DisplayTwo(weatherData); WeatherState weatherState = new WeatherState(); weatherState.Humidity = 0.0f; weatherState.Temperature = 65.3f; weatherData.updateWeatherState(weatherState); }
public void updateWeatherState(WeatherState weatherState) { this.WeatherState = weatherState; this.notifyObservers(); }