Class EventManager
java.lang.Object
theLocalLoop.EventManager
EventManager class handles the management of events in the application.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEvent(LinkedList<Event> events, Scanner input) Handles user choice for adding a new event, then prompts user for event details and adds new event to the list.static voiddeleteEvent(LinkedList<Event> events, Scanner input) Handles user choice for how they want to delete an event, then prompts user for the name of the event they want to delete Deletes it from the list if found (after confirming password, if applicable).static voiddisplayChoice(LinkedList<Event> events, Scanner input) Handles user choice for how they want to display events based on time frame, then displays results.static voiddisplayEvents(int displayChoice, LinkedList<Event> events, Scanner input) Displays events based on the user's choice of time frame.static voideditEvent(LinkedList<Event> events, Scanner input) Handles user choice for how they want to edit an event, then prompts user for the name of the event they want to edit and the details they want to edit, then updates the event with the new details.static voidfilterAndSortEvents(LinkedList<Event> events, Scanner input) Handles user choice for how they want to filter and sort events, then displays results based on their choices.static voidsearchEvents(LinkedList<Event> events, Scanner input) Handles user choice for how they want to search for an event by name, then displays results.
-
Method Details
-
displayChoice
Handles user choice for how they want to display events based on time frame, then displays results.- Parameters:
events- LinkedList of Event objects representing the list of events to display from.input- Scanner object for getting user input.
-
displayEvents
Displays events based on the user's choice of time frame.- Parameters:
displayChoice- Integer representing the user's choice for how they want to filter events by time frame (1: Today, 2: This Week, 3: This Month, 4: Later Date, 5: All Events).events- LinkedList of Event objects representing the list of events to display from.input- Scanner object for getting user input in case they choose to filter by a later date (displayChoice 4).
-
searchEvents
Handles user choice for how they want to search for an event by name, then displays results.- Parameters:
events- LinkedList of Event objects representing the list of events to search from.input- Scanner object for getting user input for the name of the event they want to search for.
-
filterAndSortEvents
Handles user choice for how they want to filter and sort events, then displays results based on their choices.- Parameters:
events- LinkedList of Event objects representing the list of events to filter and sort from.input- Scanner object for getting user input for how they want to filter and sort events.
-
addEvent
Handles user choice for adding a new event, then prompts user for event details and adds new event to the list.- Parameters:
events- LinkedList of Event objects representing the list of events to add the new event to.input- Scanner object for getting user input for the details of the new event they want to add.
-
editEvent
Handles user choice for how they want to edit an event, then prompts user for the name of the event they want to edit and the details they want to edit, then updates the event with the new details.- Parameters:
events- LinkedList of Event objects representing the list of events to search from and edit the specified event from.input- Scanner object for getting user input for the name of event, the details they want to edit, and the new details to update the event with.
-
deleteEvent
Handles user choice for how they want to delete an event, then prompts user for the name of the event they want to delete Deletes it from the list if found (after confirming password, if applicable).- Parameters:
events- LinkedList of Event objects representing the list of events to search from and delete the specified event from.input- Scanner object for getting user input for the name of event and password (if applicable).
-