@@ -0,0 +1,1288 @@
+package datastructures.util;%0A%0Aimport datastructures.graph.AbstractGraph;%0Aimport datastructures.graph.Vertex;%0A%0Apublic class GraphUtil %7B%0A%0A  @SuppressWarnings(%7B %22unchecked%22, %22rawtypes%22 %7D)%0A  public static void constructGraph(AbstractGraph graph, String%5B%5D input) %7B%0A    for (String line : input) %7B%0A      String%5B%5D values = line.split(%22 %22);%0A      String action = values%5B0%5D;%0A      Vertex sourceVertex = null, destVertex = null;%0A      int weight = 0;%0A      switch (action) %7B%0A      case %22vertex%22:%0A        Vertex vertex = graph.createVertex(values%5B1%5D);%0A        if (vertex != null) %7B%0A          System.out.println(%22Created Vertex with label: %22 + values%5B1%5D);%0A        %7D else %7B%0A          System.out.println(%22Vertex creation failed for label: %22 + values%5B1%5D);%0A        %7D%0A        break;%0A      case %22edge%22:%0A        sourceVertex = graph.getVertex(values%5B1%5D);%0A        destVertex = graph.getVertex(values%5B2%5D);%0A        if (values.length %3E 3) %7B%0A          weight = Integer.parseInt(values%5B3%5D);%0A        %7D%0A        if (graph.addEdge(sourceVertex, destVertex, weight)) %7B%0A          System.out.println(%22Edge created between: %22 + values%5B1%5D + %22 and %22 + values%5B2%5D + %22 with weight: %22 + weight);%0A        %7D else %7B%0A          System.out.println(%22Either of the vertices doesnt exist%22);%0A        %7D%0A        break;%0A      %7D%0A    %7D%0A  %7D%0A%7D%0A

Move the common graph construct functionality to Util