@@ -0,0 +1,1140 @@
+%0Aimport java.util.ArrayList;%0Aimport java.util.LinkedList;%0Aimport java.util.Queue;%0A%0Apublic class BFS%7B%0A    %0A    private int cityCount = 1;%0A    private int weight = 0;%0A    private NodeList map;%0A    private ArrayList%3CString%3E cities = new ArrayList%3C%3E();%0A    %0A    public BFS(NodeList m)%7B%0A        %0A        this.map = m;%0A        %0A    %7D%0A    %0A    public void drive(String start)%7B%0A        %0A        String s = start;%0A        Queue%3CNode%3E q = new LinkedList();%0A        Node root = map.search(s);%0A        %0A        //add where you start to the queue%0A        q.add(root);%0A        root.setVisit(true);%0A        %0A        while(!q.isEmpty())%7B%0A            %0A            //remove the first object in the queue%0A            Node v = q.poll();%0A            %0A            s = v.getData().getStartPoint();%0A            ArrayList%3CMapPoint%3E mapPoints = map.searchAll(s);%0A            for(//each node connected to the initial node)%7B%0A                if(//the connected node has not been visited)%7B%0A                    %0A                %7D%0A                %0A            %7D%0A//        if(mapPoints.isEmpty())%7B%0A//            return;%0A//        %7D%0A        %0A        %7D%0A        %0A    %7D%0A    %0A%7D%0A

Create BFS.java