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; } }