CSci2110 - Assignment 5
Due: Thursday April 4th by 11:55pm
Revisions History:
- Created Mar. 11rd, 2013
This is an exercise in creating your own reusable implementation of the UndirectedGraph ADT. Please read the chapter of your textbook covering graphs very carefully. In completing this assignment you may use code you have developed previously in this class, or code in the Java util package. You may also you the code fragments given in the text.
In order to help test your class I have created an application that creates files containing random graphs. By looking at the main in this class you can see how to read these files.
You may be interested in the graph drawing program Graphviz (available from http://www.graphviz.org/) with minimal work you can use it to visualize the graphs you create. This can be very handy for debugging purposes.
| Question 0: Implementing the UndirectedGraph ADT |
Construct your own reusable implementation of the UndirectedGraph ADT based on an adjacency list representation.
You are to also create a class, TestGraphClass, with a main() method that performs the following actions:

| Question 1: Implementing Depth First Search & Breadth First Search |
Create a class called TestGraphAlgorithms that tests classes DFS and BSF that implement your own reusable version of Depth first search (DFS) and Breadth First Search (BFS), respectively. These classes should be designed based on the Template Method Pattern as described in your textbook for DFS. You may base your methods on the code fragment provided in the text.
Test these classes carefully.