From f59ba4cd547cf64dea8d98af1457393de774255c Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 1 Sep 2025 18:45:23 -0600 Subject: [PATCH] Adding in change to Edge Node to GraphNode and making a GraphNode interface to the Node class, as we don't need the other memebers of Generic Node for a Graph Node in this case --- src/Edge.java | 4 ++-- src/Node.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Edge.java b/src/Edge.java index 067edd5..cee5ea2 100644 --- a/src/Edge.java +++ b/src/Edge.java @@ -1,6 +1,6 @@ public class Edge { - Node source; - Node destination; + GraphNode source; + GraphNode destination; int weight; public Edge(Node source, Node destination, int weight) { diff --git a/src/Node.java b/src/Node.java index c9b2877..17e38c5 100644 --- a/src/Node.java +++ b/src/Node.java @@ -4,6 +4,7 @@ import java.util.List; interface GraphNode { String name = ""; List edges = new ArrayList(); + String getName(); } public class Node implements GraphNode {