correction fonction de compartiment servir()
This commit is contained in:
@@ -7,12 +7,7 @@ public class Compartiment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
synchronized void servir(int qte){
|
synchronized void servir(int qte){
|
||||||
if(qte>quantite_courant){
|
quantite_courant -= qte;
|
||||||
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
quantite_courant -= qte;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getQuantite(){
|
public int getQuantite(){
|
||||||
|
|||||||
Reference in New Issue
Block a user