CSci 2101 Lab 15. November 29, 30.

40 points

Due Monday, December 5th.

Work in pairs on this lab.

Complete the graph implementation given in class. You will need to add testing code and the implementation for breadth-first and depth-first traversals. I will explain the shortest path method in class on Wednesday.

Feel free to use the predefined Java classes Queue, Stack, and PriorityQueue for breadth-first search, depth-first search, and the shortest path method, respectively. The standard priority queue is impelmented as a priority heap so it has log N efficiency for both addition and removal. Alternatively feel free to use your own. Note that you would need to either make objects that you are putting into the queue Comparable, or provide a Comparator.

How to submit

Submit the java file(s) with your testing code by e-mail to me. The subject of the message must be 2101 Lab 15. Make sure to CC your group partner(s).


CSci 2101 course web site.