示例#1
0
 Forecast(int temp, Rainfall rain, Cloudy clou, int hum, int ws, Wind_direction wd, Cities city)
 {
     this.temperature    = temp;
     this.rainfall       = rain;
     this.cloudy         = clou;
     this.humidity       = hum;
     this.wind_strength  = ws;
     this.wind_direction = wd;
     number_of_forecasts++;
 }
示例#2
0
    /// <summary>
    /// Returns a specific Weather class based on the value of parameter iRange
    /// </summary>
    /// <param name="iRange">Specific choice of Weather Object</param>
    /// <returns>wTempWeather</returns>
    public Weather RandomWeatherRange(int iRange)
    {
        Weather wTempWeather = new Weather();

        switch (iRange)
        {
        case 0:     //Rain
            wTempWeather = new Sunny();
            return(wTempWeather);

        case 1:     //Sunny
            wTempWeather = new Rain();
            return(wTempWeather);

        case 2:     //Cloudy
            wTempWeather = new Cloudy();
            return(wTempWeather);

        case 3:     //Snow
            wTempWeather = new Snow();
            return(wTempWeather);

        case 4:     //Windy
            wTempWeather = new Windy();
            return(wTempWeather);

        case 5:     //Thunderstorm
            wTempWeather = new Thunderstorm();
            return(wTempWeather);

        case 6:     //Hail
            wTempWeather = new Hail();
            return(wTempWeather);

        case 7:     //Fog
            wTempWeather = new Fog();
            return(wTempWeather);

        case 8:     //HeatWave
            wTempWeather = new HeatWave();
            return(wTempWeather);
        }

        return(wTempWeather);
    }
示例#3
0
 public void CloudyTest()
 {
     var s = new Cloudy().Scrape("http://www.cloudy.ec/embed.php?id=26332efa74de3");
 }