summaryrefslogtreecommitdiff
path: root/sem_5/HLIN505_Java/HLIN505/src/TP1/Adherent.java
blob: 0edcb1cdce313a313c7d247b1fac9d90d38c9c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
	}
}