public DSP2(WeatherData wd) { this.wd = wd; wd.regObs(this); }
static void Main(string[] args) { WeatherData wd = new WeatherData(); DSP1 d1 = new DSP1(wd); DSP2 d2 = new DSP2(wd); wd.notifyObs(); string z = Console.ReadLine(); }
static void Main(string[] args) { WeatherData weatherData = new WeatherData(); CurrentConditionsDisplay currentDisplay = new CurrentConditionsDisplay(weatherData); weatherData.setMeasurements(80, 65, 30.4f); string z = Console.ReadLine(); }