You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MenuItem class represents a menu item in the restaurant, with properties such as ID, name, description, price, and availability.
The Order class represents an order placed by a customer, with properties such as ID, list of menu items, total amount, order status, and timestamp.
The OrderStatus enum represents the different statuses an order can have, such as pending, preparing, ready, completed, or cancelled.
The Reservation class represents a reservation made by a customer, with properties such as ID, customer name, contact number, party size, and reservation time.
The Payment class represents a payment made for an order, with properties such as ID, amount, payment method, and payment status.
The PaymentMethod enum represents the different payment methods supported by the restaurant, such as cash, credit card, or mobile payment.
The PaymentStatus enum represents the status of a payment, which can be pending, completed, or failed.
The Staff class represents a staff member of the restaurant, with properties such as ID, name, role, and contact number.
The Restaurant class is the main class that manages the restaurant operations. It follows the Singleton pattern to ensure only one instance of the restaurant exists.
The Restaurant class provides methods for managing menu items, placing orders, updating order status, making reservations, processing payments, and managing staff.
Multi-threading is implemented using concurrent data structures (ConcurrentHashMap and CopyOnWriteArrayList) to handle concurrent access to shared data, such as orders and reservations.
The notifyKitchen and notifyStaff methods are placeholders for notifying relevant staff about order updates and status changes.
The RestaurantManagementDemo class demonstrates the usage of the restaurant management system by adding menu items, placing an order, making a reservation, processing a payment, updating order status, adding staff, and retrieving the menu.