How ephf/cs2114-project-3 works
Hold Your Spot is a Java console waitlist manager for restaurant hosts. A host starts the command loop, chooses an operation, and the controller routes input to the waitlist model; parties are validated and queued FIFO, then seated or inspected, with successful seating recorded in a capped history. The README also documents prefix removal and change events. The graph shows the principal modules and menu workflows; source excerpts support the controller’s calls, though some menu behavior is represented by shared controller code rather than separate implementation modules.
Main entry points: WaitlistController.java Command controller · Waitlist.java Waitlist rules · History.java Seating history · Main.java Application entry
Components 16
Console interaction
- Application entry
src/com/holdyourspot/Main.java - Command controller
src/com/holdyourspot/WaitlistController.java - Console prompts
src/com/holdyourspot/ConsoleView.java - Menu grid
src/com/holdyourspot/GridPrinter.java - Add party
src/com/holdyourspot/WaitlistController.java - Seat next
src/com/holdyourspot/WaitlistController.java - View waitlist
src/com/holdyourspot/WaitlistController.java - Prefix removal
src/com/holdyourspot/WaitlistController.java - View history
src/com/holdyourspot/WaitlistController.java
Waitlist domain
- Party record
src/com/holdyourspot/Party.java - Waitlist rules
src/com/holdyourspot/Waitlist.java - Change event
src/com/holdyourspot/WaitlistEvent.java - Event listener
src/com/holdyourspot/WaitlistListener.java
Queue and history
- Generic FIFO queue
src/com/holdyourspot/Queue.java - Seating history
src/com/holdyourspot/History.java
Other components
- Restaurant host
Connections 20
- Restaurant host → Application entry: starts
README.md - Application entry → Command controller: starts loop
src/com/holdyourspot/Main.java - Command controller → Console prompts: gets input
src/com/holdyourspot/WaitlistController.java - Console prompts → Menu grid: prints menu
src/com/holdyourspot/ConsoleView.java - Command controller → Add party: dispatches
src/com/holdyourspot/WaitlistController.java - Command controller → Seat next: dispatches
src/com/holdyourspot/WaitlistController.java - Command controller → View waitlist: dispatches
src/com/holdyourspot/WaitlistController.java - Command controller → Prefix removal: dispatches
src/com/holdyourspot/WaitlistController.java - Command controller → View history: dispatches
src/com/holdyourspot/WaitlistController.java - Add party → Waitlist rules: adds party
src/com/holdyourspot/WaitlistController.java - Seat next → Waitlist rules: seats next
src/com/holdyourspot/WaitlistController.java - View waitlist → Waitlist rules: reads parties
src/com/holdyourspot/WaitlistController.java - Prefix removal → Waitlist rules: removes match
src/com/holdyourspot/WaitlistController.java - Waitlist rules → Generic FIFO queue: stores entries
src/com/holdyourspot/Waitlist.java - Waitlist rules → Party record: creates parties
src/com/holdyourspot/Waitlist.java - Waitlist rules → Change event: emits changes
src/com/holdyourspot/Waitlist.java - Waitlist rules → Event listener: notifies
src/com/holdyourspot/Waitlist.java - Command controller → Seating history: records seating
src/com/holdyourspot/WaitlistController.java - Seating history → Generic FIFO queue: stores records
src/com/holdyourspot/History.java - View history → Seating history: enumerates
src/com/holdyourspot/WaitlistController.java