package com.nikolak.weatherapp.ForecastIO;

import java.util.List;
import com.nikolak.weatherapp.ForecastIO.Hour;

public class Hourly {
    private List<Hour> hourData;
    private String icon;
    private String summary;

    public List getData() {
        return this.hourData;
    }

    public void setData(List data) {
        this.hourData = data;
    }

    public String getIcon() {
        return this.icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getSummary() {
        return this.summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }
}
@@ -48,69 +48,137 @@
 ort 
-java.util.List;%0Aimport com.nikolak.weatherapp.ForecastIO.Hour
+org.json.JSONArray;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List
 ;%0A%0Ap
@@ -210,16 +210,21 @@
 private 
+Array
 List%3CHou
@@ -230,24 +230,44 @@
 ur%3E hourData
+ = new ArrayList%3C%3E()
 ;%0A    privat
@@ -390,62 +390,51 @@
 lic 
-void setData(List data) %7B%0A        this.hourData = data
+String getIcon() %7B%0A        return this.icon
 ;%0A  
@@ -451,36 +451,39 @@
 ublic String get
-Icon
+Summary
 () %7B%0A        ret
@@ -483,36 +483,39 @@
     return this.
-icon
+summary
 ;%0A    %7D%0A%0A    pub
@@ -499,32 +499,33 @@
 summary;%0A    %7D%0A%0A
+%0A
     public void 
@@ -528,209 +528,524 @@
 oid 
-setIcon(String icon) %7B%0A        this.icon = icon;%0A    %7D%0A%0A    public String getSummary() %7B%0A        return this.summary
+constructFromJson(JSONObject hourlyData) throws JSONException %7B%0A        this.summary = hourlyData.getString(%22summary%22);%0A        this.icon = hourlyData.getString(%22icon%22);%0A%0A        JSONArray hourArray = hourlyData.getJSONArray(%22data%22);%0A%0A        for (int i = 0; i %3C hourArray.length(); i++) %7B%0A            JSONObject hourJsonObject = hourArray.getJSONObject(i)
 ;%0A    
+ 
-%7D%0A%0A    public void setSummary(String summary) %7B%0A        this.summary = summary;
+       Hour hourInstance = new Hour();%0A            hourInstance.constrcutFromJson(hourJsonObject);%0A            this.hourData.add(hourInstance);%0A        %7D
 %0A   

Implement hourly forecast parsing