diff --git a/src/Azienda/Impiegato.java b/src/Azienda/Impiegato.java index a907a42..ecd82fa 100644 --- a/src/Azienda/Impiegato.java +++ b/src/Azienda/Impiegato.java @@ -16,6 +16,10 @@ public class Impiegato{ this.data=data; } + + + //METODI GET + public String getCodiceFiscale(){ return codiceFiscale; } @@ -44,6 +48,10 @@ public class Impiegato{ return paga; } + + + //METODI SET + public void setPaga(double newPaga){ paga=newPaga; } @@ -56,6 +64,10 @@ public class Impiegato{ sedeId=newSedeId; } + + + //I/O + public String toString(){ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); return codiceFiscale+" "+nome+" "+cnome+" "+sdf.format(data)+" "+livello+" "+paga+"."; diff --git a/src/Azienda/Sede.java b/src/Azienda/Sede.java index 522eb62..5d77a7d 100644 --- a/src/Azienda/Sede.java +++ b/src/Azienda/Sede.java @@ -12,6 +12,10 @@ public class Sede{ impiegati = new ArrayList(); } + + + //METODI GET + public String getId(){ return id; } @@ -32,12 +36,20 @@ public class Sede{ return impiegati; } + + + //COPY + public Sede copySede(ArrayList impiegati){ Sede sede = new Sede(getId(), getVia(), getComune(), getStato()); sede.impiegati=impiegati; return sede; } + + + //I/O + public String toString(){ return id + " " + via + " " + comune + " " + stato + "."; }