Пример #1
0
        static void Main(string[] args)
        {
            WeatherData wData = new WeatherData();

            CurrentConditions curDisplay = new CurrentConditions(wData);

            //StatisticsDisplay
            //ForecastDisplay
            curDisplay.Display();
            wData.SetMeasurements(50, 30, 1042);
            wData.SetMeasurements(20, 50, 1000);
        }
Пример #2
0
        private static void Main()
        {
            WeatherReporter weatherReporter = new WeatherReporter();

            CurrentConditions currentConditions = new CurrentConditions(weatherReporter);
            WeatherStatistics weatherStatistics = new WeatherStatistics(weatherReporter);
            WeatherForecast   weatherForecast   = new WeatherForecast(weatherReporter);
            HeatIndex         heatIndex         = new HeatIndex(weatherReporter);

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

            Console.ReadKey();
        }
Пример #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("WeatherStation");

            WeatherData weatherData = new WeatherData();

            StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData);
            ForecastDisplay   forecastDisplay   = new ForecastDisplay(weatherData);
            CurrentConditions currentConditions = new CurrentConditions(weatherData);

            while (true)
            {
                weatherData.MeasurementsChanged();
                Thread.Sleep(1000);
            }
        }