package udo.storage;

public class Storage {

    public static void main(String[] args) {
        // TODO Auto-generated method stub

    }

}

@@ -13,16 +13,130 @@
 storage;
+%0Aimport java.util.GregorianCalendar;%0A%0A//import org.json.simple.*;%0A%0Aimport com.google.gson.Gson;%0A%0Aimport java.io.*;
 %0A%0Apublic
@@ -157,16 +157,40 @@
  %7B%0A%0A    
+File storageFile;%0A    %0A%09
 public s
@@ -220,16 +220,34 @@
 %5D args) 
+throws IOException
 %7B%0A      
@@ -287,14 +287,983 @@
 tub%0A
+    %09Storage st = new Storage();%0A%09%09boolean function = st.add(%22event%22, %22meeting%22, new GregorianCalendar(2005,01,01), new GregorianCalendar(2005,01,03),%0A    %09%09%09new GregorianCalendar(2005,01,02), %22work%22, true);%0A    %09if (function) System.out.println(%22Adding successfully%22);%0A%09%7D%0A%0A    public Storage()%7B%0A    %09try%7B%0A    %09%09FileReader fr = new FileReader(%22tasks.json%22);%0A    %09%09fr.close();%0A    %09%7D catch (IOException e)%7B%0A    %09%09storageFile = new File(%22tasks.json%22);%0A    %09%7D%0A    %7D%0A    %0A    public boolean add(String taskType, String content, GregorianCalendar start, GregorianCalendar end,%0A    %09%09GregorianCalendar reminder, String label, boolean priority) throws IOException%7B%0A    %09BufferedWriter bw = new BufferedWriter(new FileWriter(%22tasks.json%22, true));%0A    %09Tasks newTask = new Tasks(taskType, content, start, end, reminder, label, priority);%0A    %09Gson gson = new Gson();%0A    %09String addingString = gson.toJson(newTask);%0A    %09bw.write(addingString);%0A    %09bw.close();%0A    %09return true;
 %0A    %7D
-%0A
 %0A%7D%0A

add function completed