Class MenuManager
java.lang.Object
theLocalLoop.MenuManager
The MenuManager class handles the display and processing of the main menu options for various methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidhandleChoice(int choice, Scanner input, LinkedList<Event> events) Handles the user's menu choice and calls the appropriate methods from the EventManager class based on the selected option.static voidPrints the display menu options to the console for viewing events based on different time frames.static voidPrints the edit menu options to the console for editing event attributes.static voidPrints the filter menu options to the console for filtering events based on type, organizer, or no filtering.static voidPrints the main menu options to the console.static voidPrints the sort menu options to the console for sorting events based on name, date and time, organizer, or duration.
-
Method Details
-
printMenu
public static void printMenu()Prints the main menu options to the console. -
printDisplayMenu
public static void printDisplayMenu()Prints the display menu options to the console for viewing events based on different time frames. -
printFilterMenu
public static void printFilterMenu()Prints the filter menu options to the console for filtering events based on type, organizer, or no filtering. -
printSortMenu
public static void printSortMenu()Prints the sort menu options to the console for sorting events based on name, date and time, organizer, or duration. -
printEditMenu
public static void printEditMenu()Prints the edit menu options to the console for editing event attributes. -
handleChoice
Handles the user's menu choice and calls the appropriate methods from the EventManager class based on the selected option.- Parameters:
choice- The user's menu choice as an integer.input- A Scanner object for reading user input from the console.events- A LinkedList of Event objects representing the list of events to be managed.
-