Overview

For this project you will implement the Breadth-First Search, Depth-First Search and Dijkstra's algorithms. Your project score will be based on submit server results. For this project you are not required to write student tests, but you are encourage to do so.

Objectives

Grading

Clarifications

Any clarifications or corrections associated with this project will be available at Clarifications.

Code Distribution

The project's code distribution is available by checking out the project named Graphs. The code distribution provides you with the following:

Specifications

This project has two main tasks: Implementing a graph representation and implementing the BFS/DFS/Dijkstra's algorithms. Notice that the Graph class is a generic class whose type parameter represents the elements of the graph we are defining (e.g., Graph<Student>, Graph<Double>, etc.). In order to represent the adjacency properties and the graph data we will use the following maps:

HashMap<String, HashMap<String, Integer>> adjacencyMap;
HashMap<String, E> dataMap;

The actual methods you need to implement are described at javadoc. You will find in the graphs package an interface named CallBack. A class implementing this interface represents a class that will process a vertex. An example of such a class is PrintCallBack (which you will find in the graph package). This class is used to generate the string that represents the path we follow when performing a breadth-first search or a depth-first search. Each time we reach a vertex, the implementation of DFS and BFS is expected to call the processVertex method to apply whatever processing needs to be done to the vertex. We have implemented PrintCallBack for you (don't modify it).

Requirements

Additional Requirements for Students in CMSC 132H (Honors)

No additional requirements.

Web Accessibility