resto
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user