Clasificacion por fecha y posibilidad de aniadir mas gestiones por mes

This commit is contained in:
2019-11-13 22:51:49 +01:00
parent 7d6a253033
commit 7b52f06a51
6 changed files with 66 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ public class Gestion{
private static float total;
private static Month mes;
private static Year anio;
private static String nombre;
public Gestion() {
this.gestiones=new Vector<Transaccion>();
@@ -16,6 +17,17 @@ public class Gestion{
Gestion.total=0;
}
public Gestion(String nombre) {
this.gestiones=new Vector<Transaccion>();
this.suma=0;
Gestion.total=0;
this.nombre=nombre;
}
public String getNombre() {
return this.nombre;
}
public void aniadirGasto(Transaccion transaccion) {
this.gestiones.add(transaccion);
this.suma+=transaccion.getDinero();