Deadline: 11:59pm Wednesday 18th January 2017
Total Marks: 3
Part 5: Chapter 17
Change into your lab05 directory and run the following command:
cp /home/cs1927/public_html/17x1/week05/labs/files/* .
Note the "." at the end of the command, meaning "into the current directory". If you've done the above correctly, you should find the following files now in the directory:
GRAPH.h |
A graph interface file. This should not need to be changed |
GRAPH_adjlist.c |
A graph implementation using an adjacency list representation. You will need to implement 2 functions in this file |
graphClient.c |
A graph test program that must be completed to test the graph functions you implement |
You must implement and test the functions
Graph GRAPHcopy(Graph g);
void GRAPHdestroy(Graph g);
int GRAPHdegree(Graph g, Vertex v); - find the degree of a given vertex
Each function that is implemented and tested properly is worth 1 mark.
You must test your functions thoroughly by adding code to the graphClient.c program. You must write assert based tests to test your GRAPHcopy code. You should be able to show your tutor using valgrind that your GRAPHdestroy function works properly.
1927 classrun 17x1 give lab05 GRAPH_adjlist.c graphClient.c