Package com.example.skeddly.business
Class WaitingList
java.lang.Object
com.example.skeddly.business.TicketList
com.example.skeddly.business.WaitingList
Class for list of people who want to attend an event
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for WaitingList.WaitingList(int max) Constructor for WaitingList. -
Method Summary
Methods inherited from class com.example.skeddly.business.TicketList
addTicket, getMax, getTicketIds, isEmpty, isFull, remove, setMax, setTicketIds, size
-
Constructor Details
-
WaitingList
public WaitingList(int max) Constructor for WaitingList.- Parameters:
max- The maximum number of tickets that can be in the list.
-
WaitingList
public WaitingList()Constructor for WaitingList.
-
-
Method Details
-
draw
Randomly select and remove a ticket from the waiting list- Returns:
- The selected ticket
- Throws:
IllegalStateException- if the list is empty.
-