This commit is contained in:
Minh VU
2024-11-28 10:59:06 +01:00
parent d3f78c7ec1
commit d73649f77f
3 changed files with 28 additions and 7 deletions

View File

@@ -1,3 +1,21 @@
import java.util.Random;
public class Cuisinier extends Employe {
private Stand_de_cuisson stand;
public Cuisinier(Stand_de_cuisson stand_de_cuisson){
this.stand= stand_de_cuisson;
}
public void faire_cuire(Client client){
try{
long temps_cuire =new Random().nextInt(300 - 100) + 100;
Thread.sleep(temps_cuire);
}catch(InterruptedException e){
System.out.println(e);
}
stand.finir_cuit();
stand.notifyAll();
}
}