-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCartNode.java
More file actions
45 lines (35 loc) · 879 Bytes
/
Copy pathCartNode.java
File metadata and controls
45 lines (35 loc) · 879 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
34
35
36
37
38
39
40
41
42
43
44
45
public class CartNode {
//Atributos
private Service service;
private int cuantity;
private CartNode next;
public CartNode(Service serviceObj, int cuantityOBJ) {
service = serviceObj;
cuantity = cuantityOBJ;
next = null;
}
//Get
public Service getService() {
return service;
}
public int getCuantity() {
return cuantity;
}
public CartNode getNext() {
return next;
}
//Set
public void setServicio(Service nuevoservicio) {
service = nuevoservicio;
}
public void setCuantity(int nuevaCantidad) {
cuantity = nuevaCantidad;
}
public void setNext(CartNode nuevoSiguiente) {
next = nuevoSiguiente;
}
public String toString() {
return "Service: " + service +
"\nCuantity: " + cuantity;
}
}