Example #1
0
        public static void Main(String[] args)
        {
            WeatherData weatherData = new WeatherData();

            CurrentConditionsDisplay currentDisplay = new CurrentConditionsDisplay(weatherData);

            weatherData.SetMeasurements(80, 65, 30, 25, 20, true);
            weatherData.SetMeasurements(90, 75, 10, 35, 20, false);
            weatherData.SetMeasurements(60, 25, 40, 5, 20, true);
        }
Example #2
0
        // 2 глава
        // 2 паттерн
        // Наблюдатель
        static void Main(string[] args)
        {
            WeatherData weatherData = new WeatherData();
            CurrentConditionsDisplay currentDisplay  = new CurrentConditionsDisplay(weatherData);
            CurrentConditionsDisplay currentDisplay1 = new CurrentConditionsDisplay(weatherData);

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