34 lines
854 B
Java
34 lines
854 B
Java
|
public class Individu{
|
||
|
private String nom;
|
||
|
private Liasse fortune;
|
||
|
|
||
|
public Individu(String nom){
|
||
|
this.nom = nom;
|
||
|
this.fortune = new Liasse();
|
||
|
}
|
||
|
|
||
|
public void add(Denomination billet){
|
||
|
this.fortune.addBillet(billet);
|
||
|
}
|
||
|
|
||
|
public void payer(int valeur, Individu vendeur){
|
||
|
// pas le temps
|
||
|
}
|
||
|
|
||
|
public String printFortune(){
|
||
|
String resultat = "";
|
||
|
for (Denomination valeur : Denomination.values()){
|
||
|
resultat += ("billet de "+this.fortune.getValeurBilletMonoliasse(valeur)+" : "+this.fortune.getNbBilletMonoliasse(valeur)+"\n");
|
||
|
}
|
||
|
resultat += ("Total : "+this.fortune.getFortune());
|
||
|
return resultat;
|
||
|
}
|
||
|
|
||
|
public int getFortune(){
|
||
|
return this.fortune.getFortune();
|
||
|
}
|
||
|
|
||
|
public String getNom(){
|
||
|
return this.nom;
|
||
|
}
|
||
|
}
|