diff options
Diffstat (limited to 'sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java')
| -rw-r--r-- | sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java b/sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java new file mode 100644 index 0000000..0edcb1c --- /dev/null +++ b/sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java @@ -0,0 +1,25 @@ +package TP1;
+
+import java.util.GregorianCalendar;
+
+public class Adherent {
+ private String nom;
+ private Boolean cotisationajour;
+ private final Integer ID;
+ private static Integer NbAdherents=0;
+ private Integer DerniereAnneeCotis;
+ public Adherent (String n) {
+ nom = n;
+ NbAdherents ++;
+ cotisationajour = true;
+ ID = NbAdherents;
+ DerniereAnneeCotis = new GregorianCalendar().get(GregorianCalendar.YEAR);
+ }
+ public void readhesion() {
+ cotisationajour=true;
+ DerniereAnneeCotis= new GregorianCalendar().get(GregorianCalendar.YEAR);
+ }
+ public void nouvelleAnnee() {
+ cotisationajour = false;
+ }
+}
|
