-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRetirosDP.java
More file actions
100 lines (81 loc) · 1.72 KB
/
Copy pathRetirosDP.java
File metadata and controls
100 lines (81 loc) · 1.72 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
91
92
93
94
95
96
97
98
99
100
import java.util.StringTokenizer;
public class RetirosDP
{
//Atributos
private String nocta, nombre, tipo,fecha;
private int saldo,saldoActualizado;
private RetirosDP next;
//Constructores
public RetirosDP()
{
this.nocta = "";
this.nombre = "";
this.tipo = "";
this.saldo = 0;
this.saldoActualizado = 0;
this.fecha="";
this.next = null;
}
public RetirosDP(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());
this.saldoActualizado = Integer.parseInt(st.nextToken());
this.fecha = 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 RetirosDP 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;
}
/*Saldo anterior*/
public void setSaldoActualizado(int cantidad)
{
this.saldoActualizado = cantidad;
}
public void setSaldo(int cantidad)
{
this.saldo = cantidad;
}
public void setNext(RetirosDP nodo)
{
this.next = nodo;
}
public String toString()
{
return this.nocta + "_" + this.nombre + "_" + this.tipo + "_" + this.saldo + "_" + this.saldoActualizado+"_"+fecha;
}
}