DEV_BUT1/DEV2.1/CM1 (copy 1)/Exercice 2/Deduction3.java
2023-04-04 14:03:16 +02:00

30 lines
617 B
Java

//MELIANI SAMY (TP1)
public class Deduction3{
private int Limite, identifiant, Credit;
private int Accumulation;
public Deduction3(){
Limite = 10;
Accumulation=0;
Credit = 10;
identifiant = 253782;
}
public int voir(){
return Credit;
}
public void crediter(){
Accumulation += 1;
}
public void vider(){
Credit = 10;
}
public String toString(){
String str = "";
str += "YesCard USER ";
str += "identifiant : " + identifiant + " ";
str += "Crédits restants : " + Credit + " ";
str += "Accumulation : " + Accumulation;
str+= " PLAT OFFERT ";
return str;
}
}