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
22 lines (22 loc) · 867 Bytes
/
Personne.java
File metadata and controls
22 lines (22 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package studsclonelight;
import java.util.ArrayList;
import studs.Bulletin;
public class Personne implements Cloneable {
private String nom, prenom;
private int nbParticipations = 0, nbOrg = 0;
private ArrayList<Scrutin> scrutins ;
public Personne(String nom, String prenom){
this.nom = nom; this.prenom = prenom; scrutins = new ArrayList<Scrutin>(); }
public Scrutin organiserScrutin(String nom) {
scrutins.add(new Scrutin(nom,this)); return scrutins.get(nbOrg++); }
@Override
public Personne clone() throws CloneNotSupportedException {
return (Personne) super.clone();
}
public String getNom(){return nom;}
public String getPrenom(){return prenom;}
public ArrayList<Scrutin> getScrutins(){return scrutins;}
public void voter(Bulletin b){ }
public void consulterResultat(Scrutin s) { }
public void seRetirerDUnScrutin(Scrutin s) { }
}