COP3530C.01, Spring 2001 Assigned: April 10, 2001 S. Lang Assignment #6 (40 pts.) Due: April 19, within10 min. of the lecture at 11:30 am Note: Two places highlighted in boldface were added after class on Tuesday, 4/10. The main objective of this programming assignment is to implement a Graph class that supports both the adjacency matrix and adjacency lists representations, and to implement a few well-known graph algorithms. The instructor will provide a Java main() method and a C++ main() function which call your Java graph methods (or C++ functions) for testing your program. The graph data files for testing your program will also be provided by the instructor. Your Graph class must satisfy the following requirements: (1) There are three private instance variables (or member variables) for representing each directed or undirected graph: (a) int numNodes: for the number of nodes (vertices) in the graph; the nodes of a graph are labeled 1 through numNodes (for example, nodes 1, 2, and 3 if numNodes = 3). (b) int adjMat: an adjacency matrix whose dimension is based on numNodes in which each entry stores the weight value of the corresponding edge. (c)
This is the end of the preview. Sign up
access the rest of the document.