Sophia S. Liau

Graph Operations

October 2024 Algorithmic Systems CPEN 221 Project

This mini project explored a series of graph operations with two different ADTs: Adjacency List and Adjacency Matrix. The operations included adding and removing vertices and edges, checking for the existence of edges, and retrieving neighbors of a vertex. These labs were completed in Java and were a great exercise in understanding graph representations and their applications. Note: Currently, the code is not available for public viewing as they are part of my course materials.

Graph Operations Image

Technical Overview

The main focus of these labs was to gain hands-on experience with implementing an abstract data type (ADT) for graphs using two common representations: Adjacency List and Adjacency Matrix. Each representation has its own advantages and trade-offs, and the labs provided an opportunity to explore these differences in depth. This includes core functions of adding/removing and identifying vertices and edges, as well as retrieving neighbors of a vertex, via various methods. I also wrote robust test cases with JUnit to ensure the correctness of the implementations. I would consider this project to be a great introduction to object oriented programming, as well as test driven development.