Package com.manager
Class DB2024TEAM07_RestaurantManager
java.lang.Object
com.manager.DB2024TEAM07_RestaurantManager
This class manages restaurant functionalities in the E-MATEASY application.
It provides methods for adding, updating, searching, and deleting restaurants
from the database.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddRestaurant(Scanner scanner) Adds a new restaurant to the database.static voiddeleteRestaurant(Scanner scanner) Deletes a restaurant from the database.static voidDisplays a list of all restaurants in the database.static voidDisplays a randomly selected restaurant from the database.static voidsearchRestaurant(Scanner scanner) Searches for restaurants based on various criteria.static voidsearchRestaurantByCategory(Scanner scanner) Searches for restaurants by cuisine type.static voidupdateRestaurant(Scanner scanner, DB2024TEAM07_RestaurantDAO restaurantDAO) Updates an existing restaurant in the database.
-
Field Details
-
restaurantDAO
-
-
Constructor Details
-
DB2024TEAM07_RestaurantManager
public DB2024TEAM07_RestaurantManager()
-
-
Method Details
-
addRestaurant
Adds a new restaurant to the database.- Parameters:
scanner- a Scanner object to read user input
-
updateRestaurant
Updates an existing restaurant in the database.- Parameters:
scanner- a Scanner object to read user inputrestaurantDAO- an instance of the DB2024TEAM07_RestaurantDAO class
-
searchRestaurant
Searches for restaurants based on various criteria.- Parameters:
scanner- a Scanner object to read user input
-
searchRestaurantByCategory
Searches for restaurants by cuisine type.- Parameters:
scanner- a Scanner object to read user input
-
deleteRestaurant
Deletes a restaurant from the database.- Parameters:
scanner- a Scanner object to read user input
-
displayAllRestaurants
public static void displayAllRestaurants()Displays a list of all restaurants in the database. -
displayRandomRestaurant
public static void displayRandomRestaurant()Displays a randomly selected restaurant from the database.
-