forked from daveagp/java_visualize
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPersonne.java
More file actions
24 lines (24 loc) · 722 Bytes
/
Personne.java
File metadata and controls
24 lines (24 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package studsstat;
public class Personne {
private String nom, prenom;
private int nbParticipations = 0, nbOrganisations = 0 ;
private static int nbTotalParticipations = 0;
public Personne(final String nom, final String prenom){
this.nom = nom; this.prenom = prenom;
}
public Personne(final String nom, final String prenom,
final int nbp, final int nbo) {
this(nom,prenom);
nbParticipations = nbp;
nbTotalParticipations += nbp;
nbOrganisations = nbo;
}
public static int getNbTotalParticipations() {
return nbTotalParticipations;
}
public String toString() {
return nom + " " + prenom + " nbp " + nbParticipations
+ " nbo " + nbOrganisations + " nbt "
+ nbTotalParticipations;
}
}