-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLeaveEvent.java
More file actions
27 lines (24 loc) · 809 Bytes
/
LeaveEvent.java
File metadata and controls
27 lines (24 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cs2030.simulator;
/**
* LeaveEvent where customer leaves the shop.
* LeaveEvent contains EventStatus status.
*/
public class LeaveEvent extends Event {
private static final EventStatus status = EventStatus.LEAVE;
/**
* Constructs a LeaveEvent containing a customer and an execute method
* that returns an empty Pair.
* @param customer Customer that is leaving the shop.
*/
public LeaveEvent(Customer customer) {
super(customer, customer.getArrivalTime(), null, x -> Pair.empty(), status);
}
/**
* Retrieve String representation of LeaveEvent.
* @return Customer that is leaving the shop.
*/
@Override
public String toString() {
return String.format("%s leaves", super.toString());
}
}