COP3530C.01, Spring 2001Assigned:April 10, 2001S. LangAssignment #6 (40 pts.)Due:April 19, within10 min. ofthe lecture at 11:30 amNote: 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.
This is the end of the preview.
access the rest of the document.
As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.
Temple University Fox School of Business ‘17, Course Hero Intern
I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.
University of Pennsylvania ‘17, Course Hero Intern
The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.