-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClientesDP.java
More file actions
90 lines (72 loc) · 1.42 KB
/
Copy pathClientesDP.java
File metadata and controls
90 lines (72 loc) · 1.42 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import java.util.StringTokenizer;
public class ClientesDP
{
//Atributos
private String nocta, nombre, tipo;
private int saldo;
private ClientesDP next;
//Constructores
public ClientesDP()
{
this.nocta = "";
this.nombre = "";
this.tipo = "";
this.saldo = 0;
this.next = null;
}
public ClientesDP(String datos)
{
StringTokenizer st = new StringTokenizer(datos,"_");
this.nocta = st.nextToken();
this.nombre = st.nextToken();
this.tipo = st.nextToken();
this.saldo = Integer.parseInt(st.nextToken());
}
//Metodos: Accesors (geters) y Mutators (seters)
//Accesors (geters)
public String getNocta()
{
return this.nocta;
}
public String getNombre()
{
return this.nombre;
}
public String getTipo()
{
return this.tipo;
}
public int getSaldo()
{
return this.saldo;
}
public ClientesDP getNext()
{
return this.next;
}
//Mutators (seters)
public void setNocta(String cta)
{
this.nocta = cta;
}
public void setNombre(String name)
{
this.nombre = name;
}
public void setTipo(String tcta)
{
this.tipo = tcta;
}
public void setSaldo(int cantidad)
{
this.saldo = cantidad;
}
public void setNext(ClientesDP nodo)
{
this.next = nodo;
}
public String toString()
{
return this.nocta + "_" + this.nombre + "_" + this.tipo + "_" + this.saldo;
}
}