feat: change up organisation

This commit is contained in:
2023-04-24 11:02:37 +08:00
parent 13f372ec5a
commit dd56398b7d
378 changed files with 4653 additions and 107 deletions

View File

@@ -0,0 +1,24 @@
class JoinShopQueueEvent extends Event {
private Customer customer;
private Shop shop;
public JoinShopQueueEvent(Customer customer, Shop shop) {
super(customer.getArrivalTIme());
this.customer = customer;
this.shop = shop;
}
@Override
public Event[] simulate() {
this.shop.joinQueue(customer);
return new Event[] {};
}
@Override
public String toString() {
return String.format("%s: %s joined shop queue %s",
super.toString(),
this.customer, this.shop);
}
}