Beispiel #1
0
        public void display(object o, WeatherDataArgs e)
        {
            this.temperature = average(this.temperature, e.Temperature);
            this.humidity = average(this.humidity, e.Humidity);

            Console.WriteLine($"Current Conditions: Averag temp: {temperature:F1}C Average humidity: {humidity:F1}%");
        }
Beispiel #2
0
 public void display(object o, WeatherDataArgs e)
 {
     this.temperature = e.Temperature;
     this.humidity = e.Humidity;
     Console.WriteLine($"Current Conditions: Temp: {temperature:F1}C Humidity: {humidity:F1}%");
 }