package org.yoooo.se1;

public class Application {
    public void run(String[] args) {

    }

    public SimpleDirectedWeightGraph<String, Integer> getGraph() {
        return null;
    }

    private static Application sInstance = new Application();

    public static Application getInstance() {
        return sInstance;
    }

    private Application() {
    }
}

@@ -17,16 +17,43 @@
 o.se1;%0A%0A
+import java.util.Scanner;%0A%0A
 public c
@@ -386,11 +386,1306 @@
  %7B%0A    %7D
+%0A%0A    /**%0A     * Parses string and generates graph from the string as specified in feature 1. The string%0A     * should only contain lowercase letters and spaces.%0A     *%0A     * @param string string from input file%0A     * @return graph created from string%0A     */%0A    private SimpleDirectedWeightGraph%3CString, Integer%3E stringToGraph(String string) %7B%0A        Scanner scanner = new Scanner(string);%0A        SimpleDirectedWeightGraph%3CString, Integer%3E graph = new SimpleDirectedWeightGraph%3C%3E(%0A                new EdgeFactory%3CString, Integer%3E() %7B%0A                    int next;%0A%0A                    @Override%0A                    public Integer createEdge(String source, String target) %7B%0A                        return next++;%0A                    %7D%0A                %7D);%0A        if (!scanner.hasNext()) %7B%0A            return graph;%0A        %7D%0A        String prev = scanner.next();%0A        graph.addVertex(prev);%0A        while (scanner.hasNext()) %7B%0A            String vertex = scanner.next();%0A            graph.addVertex(vertex);%0A            Integer edge = graph.getEdge(prev, vertex);%0A            if (edge != null) %7B%0A                graph.setEdgeWeight(edge, graph.getEdgeWeight(edge) + 1);%0A            %7D else %7B%0A                graph.addEdge(prev, vertex);%0A            %7D%0A        %7D%0A        return graph;%0A    %7D
 %0A%7D%0A

Add graph generation