

Language: Java 5.0

First step is to unpack the jar file by using the jar command

use a java complier that supports Java 5.0 to compile.  Run just like any other java program

Classes:

  Graph:
    - a set of nodes and edges telling a path from one node to another
    
    how to use:
       - to create a graph, say g1, first make a new graph:
       
          Graph g1 = new Graph();
          
       - to add edges: use the addEdge method which takes two integer values
                     the first is the node the edge originates from and
                     the second is the node the edge leads to.
                     
      - Adding Nodes:
                 Use  the addNode method which takes an integer value and creates a node
                      with that value if that node doesnot already exist in the graph
                 -or-
                 Use  the addEdge method: if either int given to the addEdge method is not
                      in the graph, that node will be added to the graph.
                      
       - sample code to make this graph < (1,2) , (2,4) , (2,1) , (2,3) , (3,4) , (4,5)>
             Graph g1 = new Graph();
             g1.addEdge(1,2);
             g1.addEdge(2,4);
             g1.addEdge(2,1);
             g1.addEdge(2,3);
             g1.addEdge(3,4);
             g1.addEdge(4,5);
             
     ****- Searches: *****
     
            breadth_first_search(int start, int goal)
                returns true if found a path, false if it did not
            depth_first_search(int start, int goal)
                 returns true if found a path, false if it did not
                 
            these are methods on the class Graph
            
            
      test Cases provided in searches.java in the .jar file