Question: public class Node { String name; String val; String abbrev; ArrayList outgoingEdges; ArrayList incomingEdges; public Node ( String var 1 ) { this.setAbbrev ( var

public class Node {
String name;
String val;
String abbrev;
ArrayList outgoingEdges;
ArrayList incomingEdges;
public Node(String var1){
this.setAbbrev(var1);
this.val = null;
this.name = null;
this.outgoingEdges = new ArrayList();
this.incomingEdges = new ArrayList();
}
public String getAbbrev(){
return this.abbrev;
}
public String getName(){
return this.name;
}
public String getVal(){
return this.val;
}
public ArrayList getOutgoingEdges(){
return this.outgoingEdges;
}
public ArrayList getIncomingEdges(){
return this.incomingEdges;
}
public void setAbbrev(String var1){
this.abbrev = var1;
}
public void setName(String var1){
this.name = var1;
}
public void setVal(String var1){
this.val = var1;
}
public void addOutgoingEdge(Edge var1){
this.outgoingEdges.add(var1);
}
public void addIncomingEdge(Edge var1){
this.incomingEdges.add(var1);
}
}
public class Edge {
int dist;
Node tail;
Node head;
public Edge(Node var1, Node var2, int var3){
this.setDist(var3);
this.setTail(var1);
this.setHead(var2);
}
public Node getTail(){
return this.tail;
}
public Node getHead(){
return this.head;
}
public int getDist(){
return this.dist;
}
public void setTail(Node var1){
this.tail = var1;
}
public void setHead(Node var1){
this.head = var1;
}
public void setDist(int var1){
this.dist = var1;
}
}
STRUGGLING, PLEASE HELP
public class Node { String name; String val;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!