public HeatIndexDisplay(WeatherData weatherData)
 {
     this._weatherData = weatherData;
     weatherData.RegisterObserver(this);
 }
 public StatisticsDisplay(WeatherData weatherData)
 {
     this._weatherData = weatherData;
     weatherData.RegisterObserver(this);
 }
 public ForecastDisplay(WeatherData weatherData)
 {
     this._weatherData = weatherData;
     weatherData.RegisterObserver(this);
 }
 public ForecastDisplay(WeatherData weatherData)
 {
     this._weatherData = weatherData;
     weatherData.RegisterObserver(this);
 }
        static void Main(string[] args)
        {
            WeatherData weatherData = new WeatherData();

            CurrentConditionsDisplay currentDisplay = new CurrentConditionsDisplay(weatherData);
            StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData);
            ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData);
            HeatIndexDisplay heatIndexDisplay = new HeatIndexDisplay(weatherData);

            weatherData.SetMeasurements(80, 65, 30.4f);
            weatherData.SetMeasurements(82, 70, 29.2f);
            weatherData.SetMeasurements(78, 90, 29.2f);

            // Wait for user
            Console.ReadKey();
        }
 public StatisticsDisplay(WeatherData weatherData)
 {
     this._weatherData = weatherData;
     weatherData.RegisterObserver(this);
 }
 public HeatIndexDisplay(WeatherData weatherData)
 {
     this._weatherData = weatherData;
     weatherData.RegisterObserver(this);
 }