This commit is contained in:
Minh VU
2024-11-28 10:41:37 +01:00
parent d949e97583
commit d3f78c7ec1
2 changed files with 52 additions and 3 deletions

View File

@@ -10,4 +10,22 @@ public class Restaurant {
Employe_du_buffet employeB = new Employe_du_buffet(compPoisson,compViande,compLegume,compNouille);
public synchronized boolean libre(){
if(nbClient>MAX_CLIENTS){
return false;
}else {
return true;
}
}
public synchronized void ajouterClient(){
if(nbClient<MAX_CLIENTS){
nbClient++;
}
}
public synchronized void diminuerClient(){
if(nbClient<MAX_CLIENTS){
nbClient++;
}
}
}