Homework 9

Learning Goals

Pair Programming

We will assign you a peer to collaborate with on this assignment. Please,

Task 0: Familiarize yourself with the starter code.

Task 1: Complete the Directed Graph Implementation

Complete the implementation of the DiGraph interface in the AdjListsDiGraph<T> class. You can test your code in a new file called Driver.java, storing the output of your testing in Tests.txt.

Tips:

Task 2: Graph Traversal

Together with your partner, take a look at the pseudocode for the depth-first search traversal seen in class. Now write code to implement it. Make sure to test it on a few different kinds of graphs/paths to make sure it works as expected.

To help you test your code, we’ve included a folder of graphs, tgf_graphs, that contains .tgf files of graphs. You’re welcome to use these graphs in your testing. To visualize the graphs, you can open the files with the yED Live browser app. To load the graphs into your code, we’ve provided you with the method AdjListsGraphFromFile.


Submission Checklist