Untitled
unknown
java
3 years ago
340 B
8
Indexable
package LAB9;
public class GraphEdge
{
GraphNode fromNode;
GraphNode toNode;
int weight; // Add a weight field
// Update the constructor to include the weight
public GraphEdge(GraphNode from, GraphNode to, int weight)
{
this.fromNode = from;
this.toNode = to;
this.weight = weight;
}
}
Editor is loading...