summaryrefslogtreecommitdiff
path: root/sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java
diff options
context:
space:
mode:
authorGaspard Coulet <gaspard.coulet@mines-ales.org>2021-04-28 23:05:53 +0200
committerGaspard Coulet <gaspard.coulet@mines-ales.org>2021-04-28 23:05:53 +0200
commit9fe033ea88c2f705ec18c232873d056e0c229d72 (patch)
tree0647dc8c51610c7336c88c04de2068ea14b21e17 /sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java
Initial commit
Diffstat (limited to 'sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java')
-rw-r--r--sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java25
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;
+ }
+}