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 26 27 28 29 30 31 32 33 34
| enum Type
{
Rare("Rare"),
Epique ("Epique"),
Standard ("Standard");
String description;
Type (String description){
this.description = description;
}
public String getDescription() {
return description;
}
} ;
public class Arme {
private String nom ;
private Type classe ;
private int degats ;
/**
* @param classe
* @param degats
* @param nom
*/
public Arme(Type classe, int degats, String nom) {
super();
this.classe = classe;
this.degats = degats;
this.nom = nom;
}
public Type getType (){return classe;}
} |