started ex Z4

This commit is contained in:
2025-01-13 18:18:14 +01:00
parent c7d054e973
commit afc2fbfa8a
13 changed files with 478 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package exercises.ex_k_bis1;
public class TestServiceDesk {
public static void main(String[] args) {
/*
ServiceDesk serviceDesk = new ServiceDesk(2);
for (int j = 0; j<3; j++) {
new Thread(new ServiceRepresentative(serviceDesk), "Employee-"+ j).start();
}
// Start customer threads
for (int i = 0; i < 10; i++) { // 30 customers
String name = "Customer-" + i;
new Thread(new Customer(name, serviceDesk)).start();
try {
Thread.sleep((int) (Math.random() * 1000)); // Random arrival
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
*/
}
}