Exemplo n.º 1
0
 public Wind getWind()
 {
     if (Anemo == null)
     {
         return(new Wind(Double.NaN, Double.NaN));
     }
     return(Anemo.Measure());
 }
Exemplo n.º 2
0
        public object Clone()
        {
            WeatherStation cl = new WeatherStation(Name, loc);

            if (Thermo != null)
            {
                cl.Insert((Thermometer)Thermo.Clone());
            }
            if (Anemo != null)
            {
                cl.Insert((WindMeter)Anemo.Clone());
            }
            if (Bar != null)
            {
                cl.Insert((Barometer)Bar.Clone());
            }
            if (Hygro != null)
            {
                cl.Insert((Hygrometer)Hygro.Clone());
            }

            return(cl);
        }