This Java project provides a flexible implementation of a mutable weighted directed graph with labeled vertices, offering two distinct implementations: ConcreteVerticesGraph
and ConcreteEdgesGraph
.
The Graph
interface defines the operations for a weighted directed graph with labeled vertices. Key functionalities include:
- Adding and removing vertices
- Setting edges with weights
- Retrieving vertices and their connections
Each method in the interface is thoroughly documented with specifications and strategies in the JavaDoc comments.
This class implements the Graph
interface using a list of vertices (Vertex
class) and their connections. Highlights include:
- Operations for managing vertices and their connections
- Robust JavaDoc comments detailing method specifications and strategies
An alternative implementation of the Graph
interface utilizing an Edge
class to represent connections. Key features include:
- Different underlying data structure compared to
ConcreteVerticesGraph
- Similar functionalities with a different approach
An abstract JUnit test class containing test cases for the Graph
interface. Features include:
- Comprehensive tests covering various functionalities of the graph ADT
- In-depth JavaDoc comments specifying testing strategies for each test case
These test classes provide specific test cases for the concrete implementations. Highlights include:
- Detailed test methods with JavaDoc comments outlining each test's purpose and functionalities being tested
To utilize this graph implementation in your Java project:
- Clone or download the repository.
- Import the relevant Java files into your project.
- Instantiate the
ConcreteVerticesGraph
orConcreteEdgesGraph
classes to work with directed graphs.
Execute the provided JUnit tests in the test package to ensure the functionalities and correctness of the graph implementation.
This project is licensed under the MIT License - see the LICENSE file for detailed licensing information.