@@ -0,0 +1,1502 @@
+package codeu.chat.server;%0A// Where should this file and StoredData be saved?%0A//  In the same folder as Model.java?%0A%0Aimport codeu.chat.server.Model;%0A%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.ObjectOutputStream;%0A%0Apublic class Snapshotter implements Runnable %7B%0A%0A    private Model model;%0A%0A    public Snapshotter(Model model) %7B%0A        this.model = model;%0A    %7D%0A%0A    public void run() %7B%0A        boolean infinite = true; %0A        while (infinite = true) %7B // I feel like this isnt a good way to make an infinite while loop but%0A            sleep();%0A            serialize();%0A        %7D%0A        %0A    %7D%0A%0A    public void serialize() %7B%0A        try %7B%0A        // StoredData.txt is a file to save the serialized data to%0A        FileOutputStream fs = new FileOutputStream(%22StoredData.txt%22);%0A%0A        ObjectOutputStream os = new ObjectOutputStream(fs);%0A%0A        // should I be serializing a Model instance I create?%0A        os.writeObject(model); %0A        %0A        // close the streams%0A        os.close();%0A        fs.close();%0A%0A        %7D catch (IOException i) %7B%0A            i.printStackTrace();%0A        %7D%0A    %7D%0A%0A    public void sleep() %7B%0A        try %7B%0A            // makes thread sleep for 30 seconds - therefore it updates the data every 30 seconds%0A            Thread.sleep(30000);%0A        %7D catch (InterruptedException ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A    %7D%0A    // where should the deserialization occur? %0A    // when it checks for the optional flag in ServerMain?%0A%7D

Add Snapshotter.java