- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.java
More file actions
Latest commit
34 lines (29 loc) · 580 Bytes
/
Copy pathNode.java
File metadata and controls
34 lines (29 loc) · 580 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
packagepoly;
/**
* This class implements a linked list node that contains a Term instance.
*
* @author runb-cs112
*
*/
publicclassNode {
/**
* Term instance.
*/
Termterm;
/**
* Next node in linked list.
*/
Nodenext;
/**
* Initializes this node with a term with given coefficient and degree,
* pointing to the given next node.
*
* @param coeff Coefficient of term
* @param degree Degree of term
* @param next Next node
*/
publicNode(floatcoeff, intdegree, Nodenext) {
term = newTerm(coeff, degree);
this.next = next;
}
}