Skip to content

Repository files navigation

In this project, I created a graph class that stores a linked list of nodes, representing a unidirectional (directed) graph. I also created a node class that stores a string, and a linked list of edges connecting other nodes.

THe program takes as input a file containing node names and links. Each line in the file contains the name of a node, a node connected to it, and the distance. Names may be repeated for additional links.

Based on instructions, all data elements are private. This is because it helps to declare the graph class a friend to the node class. The class also contains functions to move around the graph, search depth-first, and breadth-first. These functions were used to display the contents of the graph.

The Main.cpp file was given by the instructor. The rest of the code was implemented by me.

This project was for my introduction to programming II class at university. Using my knowledge from class, I implemented the necessary algorithms/code. I also used my course materials (lecture slides and textbooks) and advice from the professor.

About

In this project, I created a graph class that stores a linked list of nodes representing a graph. I created a node class that stores a string, and a linked list of edges connecting other nodes.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages