Answer:
Following is the definition of class WeatherForecast:
public class WeatherForecast
{
//declare variables
private int low, high;
private String skies;
//set methods
public void setSkies(String sks)
{
this.skies = sks;
}
public void setHigh(int hgh)
{
this.high = hgh;
}
public void setLow(int lw)
{
this.low = lw;
}
//get methods
public String getSkies()
{
return skies;
}
public int getHigh()
{
return high;
}
public int getLow()
{
return low;
}
}
Step-by-step explanation:
Here three set methods i.e. setSkies(), setHigh() and setLow() are used to set the values for variables skies, high and low.
Get methods i.e. getSkies(), getHigh() and getLow() are used to get the values stored in these variables.