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

This commit is contained in:
Frank
2025-09-01 18:45:23 -06:00
parent d40e0a6e35
commit f59ba4cd54
2 changed files with 3 additions and 2 deletions

View File

@@ -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) {

View File

@@ -4,6 +4,7 @@ import java.util.List;
interface GraphNode {
String name = "";
List<Edge> edges = new ArrayList<Edge>();
String getName();
}
public class Node implements GraphNode {