Answer:
public class WeatherForecast {
private String sky = "";
private int highTemperature = 0;
private int lowTemperature = 0;
public void setSkies(String sky ){
this.sky = sky;
}
public void setHigh(int highTemperature){
this.highTemperature = highTemperature;
}
public void setLow(int lowTemperature){
this.lowTemperature = lowTemperature;
}
public String getSkies(){
return sky;
}
public int getHigh(){
return highTemperature;
}
public int getLow(){
return lowTemperature;
}
}
Step-by-step explanation:
- Three private variables are created to hold values.
- Since variables are private, three set methods are created to set the given values.
- Since variables are private, three get methods are created to return the values