Hey I just got home from work, I’m sending you right now and it seems like there are two things due this week, the first one is lab and the other one course project, so I’m sending you both 🙂 thanks for the understanding.
The purpose of the Lab exercises is to help the student acquire skills in solving problems that require data structures that implement graphs.
There are three exercises in this Lab. Be sure and read the following instructions carefully.
Create a folder and name it Week 7 Lab. Inside this folder, create the subfolders Ex1, Ex2, and Ex3. Place the solution to each of the three exercises required for submission in the corresponding subfolder. Compress the folder Week 7 Lab, and submit the resulting zipped folder.
Note that Exercises 1, 2, and 3 require software development. For each of them, place in the corresponding folder the source code files (i.e., .h and .cpp files) you created, and a screenshot of the execution window. Do not submit other files or folders, including those automatically generated by the IDE.
Use a personal copy or access the software at https://lab.devry.edu (Links to an external site.)Links to an external site..
Exercise 1: Adjacency Matrix
Implement a Graph class using the adjacency matrix to represent a graph. Test your class.
Exercise 2: Adjacency List
Implement a Graph class using the adjacency list to represent a graph. Test your class.
Exercise 3: Graph Traversal
Add a method to both of the Graph classes developed in the previous exercises to print the graph nodes using a depth-first search traversal. Test the methods.
Note: Please consult sections 13.3.1 and 13.3.2 of our textbook, where depth-first search is discussed.