Changes

Jump to: navigation, search

Teams Winter 2011/team2/project

7,043 bytes added, 16:55, 16 April 2011
no edit summary
}
ArrayList<Weather> weathers;
}
</syntaxhighlight>
 
5. Create Weather class
 
<syntaxhighlight lang="java">
 
package ecl.team2.project.weather;
 
 
public class Weather {
private String date;
private String tempMaxC;
private String tempMaxF;
private String tempMinC;
private String tempMinF;
private String windspeedMiles;
private String windspeedKmph;
private String winddirection;
private String winddir16Point;
private String winddirDegree;
private String weatherCode;
private String weatherIconUrl;
private String weatherDesc;
private String precipMM;
 
 
public Weather(){
super();
}
public Weather(String date, String tempMaxC, String tempMaxF,
String tempMinC, String tempMinF, String windspeedMiles,
String windspeedKmph, String winddirection, String winddir16Point,
String winddirDegree, String weatherCode, String weatherIconUrl,
String weatherDesc, String precipMM) {
super();
this.date = date;
this.tempMaxC = tempMaxC;
this.tempMaxF = tempMaxF;
this.tempMinC = tempMinC;
this.tempMinF = tempMinF;
this.windspeedMiles = windspeedMiles;
this.windspeedKmph = windspeedKmph;
this.winddirection = winddirection;
this.winddir16Point = winddir16Point;
this.winddirDegree = winddirDegree;
this.weatherCode = weatherCode;
this.weatherIconUrl = weatherIconUrl;
this.weatherDesc = weatherDesc;
this.precipMM = precipMM;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getTempMaxC() {
return tempMaxC;
}
public void setTempMaxC(String tempMaxC) {
this.tempMaxC = tempMaxC;
}
public String getTempMaxF() {
return tempMaxF;
}
public void setTempMaxF(String tempMaxF) {
this.tempMaxF = tempMaxF;
}
public String getTempMinC() {
return tempMinC;
}
public void setTempMinC(String tempMinC) {
this.tempMinC = tempMinC;
}
public String getTempMinF() {
return tempMinF;
}
public void setTempMinF(String tempMinF) {
this.tempMinF = tempMinF;
}
public String getWindspeedMiles() {
return windspeedMiles;
}
public void setWindspeedMiles(String windspeedMiles) {
this.windspeedMiles = windspeedMiles;
}
public String getWindspeedKmph() {
return windspeedKmph;
}
public void setWindspeedKmph(String windspeedKmph) {
this.windspeedKmph = windspeedKmph;
}
public String getWinddirection() {
return winddirection;
}
public void setWinddirection(String winddirection) {
this.winddirection = winddirection;
}
public String getWinddir16Point() {
return winddir16Point;
}
public void setWinddir16Point(String winddir16Point) {
this.winddir16Point = winddir16Point;
}
public String getWinddirDegree() {
return winddirDegree;
}
public void setWinddirDegree(String winddirDegree) {
this.winddirDegree = winddirDegree;
}
public String getWeatherCode() {
return weatherCode;
}
public void setWeatherCode(String weatherCode) {
this.weatherCode = weatherCode;
}
public String getWeatherIconUrl() {
return weatherIconUrl;
}
public void setWeatherIconUrl(String weatherIconUrl) {
this.weatherIconUrl = weatherIconUrl;
}
public String getWeatherDesc() {
return weatherDesc;
}
public void setWeatherDesc(String weatherDesc) {
this.weatherDesc = weatherDesc;
}
public String getPrecipMM() {
return precipMM;
}
public void setPrecipMM(String precipMM) {
this.precipMM = precipMM;
}
}
 
</syntaxhighlight>
6. CurrentCondition.java class will return weather as of now.
 
<syntaxhighlight lang="java">
package ecl.team2.project.weather;
 
public class CurrentCondition {
private String observation_time;
private String temp_C;
private String temp_F;
private String weatherCode;
private String weatherIconUrl;
private String weatherDesc;
private String windspeedMiles;
private String windspeedKmph;
private String winddirDegree;
private String winddir16Point;
private String precipMM;
private String humidity;
private String visibility;
private String pressure;
private String cloudcover;
public CurrentCondition(String observation_time, String temp_C, String temp_F,
String weatherCode, String weatherIconUrl, String weatherDesc,
String windspeedMiles, String windspeedKmph, String winddirDegree,
String winddir16Point, String precipMM, String humidity,
String visibility, String pressure, String cloudcover) {
super();
this.observation_time = observation_time;
this.temp_C = temp_C;
this.temp_F = temp_F;
this.weatherCode = weatherCode;
this.weatherIconUrl = weatherIconUrl;
this.weatherDesc = weatherDesc;
this.windspeedMiles = windspeedMiles;
this.windspeedKmph = windspeedKmph;
this.winddirDegree = winddirDegree;
this.winddir16Point = winddir16Point;
this.precipMM = precipMM;
this.humidity = humidity;
this.visibility = visibility;
this.pressure = pressure;
this.cloudcover = cloudcover;
}
public CurrentCondition() {
super();
}
 
public String getObservation_time() {
return observation_time;
}
public void setObservation_time(String observation_time) {
this.observation_time = observation_time;
}
public String getTemp_C() {
return temp_C;
}
public void setTemp_C(String temp_C) {
this.temp_C = temp_C;
}
public String getTemp_F() {
return temp_F;
}
public void setTemp_F(String temp_F) {
this.temp_F = temp_F;
}
public String getWeatherCode() {
return weatherCode;
}
public void setWeatherCode(String weatherCode) {
this.weatherCode = weatherCode;
}
public String getWeatherIconUrl() {
return weatherIconUrl;
}
public void setWeatherIconUrl(String weatherIconUrl) {
this.weatherIconUrl = weatherIconUrl;
}
public String getWeatherDesc() {
return weatherDesc;
}
public void setWeatherDesc(String weatherDesc) {
this.weatherDesc = weatherDesc;
}
public String getWindspeedMiles() {
return windspeedMiles;
}
public void setWindspeedMiles(String windspeedMiles) {
this.windspeedMiles = windspeedMiles;
}
public String getWindspeedKmph() {
return windspeedKmph;
}
public void setWindspeedKmph(String windspeedKmph) {
this.windspeedKmph = windspeedKmph;
}
public String getWinddirDegree() {
return winddirDegree;
}
public void setWinddirDegree(String winddirDegree) {
this.winddirDegree = winddirDegree;
}
public String getWinddir16Point() {
return winddir16Point;
}
public void setWinddir16Point(String winddir16Point) {
this.winddir16Point = winddir16Point;
}
public String getPrecipMM() {
return precipMM;
}
public void setPrecipMM(String precipMM) {
this.precipMM = precipMM;
}
public String getHumidity() {
return humidity;
}
public void setHumidity(String humidity) {
this.humidity = humidity;
}
public String getVisibility() {
return visibility;
}
public void setVisibility(String visibility) {
this.visibility = visibility;
}
public String getPressure() {
return pressure;
}
public void setPressure(String pressure) {
this.pressure = pressure;
}
public String getCloudcover() {
return cloudcover;
}
public void setCloudcover(String cloudcover) {
this.cloudcover = cloudcover;
}
}
</syntaxhighlight>
1
edit

Navigation menu