The Algorithms class provides an array of GraphAlgorithm objects to the NetWorKsPanel class. This very simple class provides the mechanism for adding new GraphAlgorithms to the NetWorKs program. Whenever a new GraphAlgorithm is developed, the new GraphAlgorithm is added to the array in the Algorithms class. This means that only the new class and the Algorithms class need be compiled.
package GraphStuff;
public class Algorithms {
public static final GraphAlgorithm[] algs
= {new Kruskal(),
new Topological(),
new Dijkstra(),
new DepthFirst()};
}