-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.java
More file actions
33 lines (32 loc) · 778 Bytes
/
Node.java
File metadata and controls
33 lines (32 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//NodeClass used for making the nodes.
public class Node{
StudentRecord data;
Node nextRef;
//Constructors
public Node(){
this.data = null;
this.nextRef = null;
}
public Node(StudentRecord data){
this.data = data;
this.nextRef = null;
}
public Node(StudentRecord data, Node nextRef){
this.data = data;
this.nextRef = nextRef;
}
//Mutators
public void setData(StudentRecord nextData){
this.data = nextData;
}
public void setNextRef(Node nextRef){
this.nextRef = nextRef;
}
//Accessors
public Student getData(){
return this.data;
}
public Node getNextRef(){
return this.nextRef;
}
}