b43086f578
- Implement Controller listMenuItems() and addMenuItem() - Add m_uid to MenuItem to track unique menu item id - Implement MenuItem getDescription() method - Add addMenuItem() method in Restaurant Class
46 lines
959 B
C++
46 lines
959 B
C++
/*
|
|
Author: Joel Mathew Thomas
|
|
Date: 18-02-2026
|
|
*/
|
|
|
|
#pragma once
|
|
#include <string>
|
|
#include <memory>
|
|
#include <map>
|
|
|
|
class User;
|
|
class Restaurant;
|
|
class MenuItem;
|
|
|
|
using users = std::map<std::string, std::shared_ptr<User>>;
|
|
using restaurants = std::map<int, std::shared_ptr<Restaurant>>;
|
|
using menuItems = std::map<int, std::shared_ptr<MenuItem>>;
|
|
|
|
class FoodDeliveryController
|
|
{
|
|
private:
|
|
users m_users;
|
|
restaurants m_restaurants;
|
|
std::shared_ptr<User> m_authenticatedUser;
|
|
public:
|
|
void run();
|
|
void login();
|
|
void registerUser();
|
|
void listRestaurants() const;
|
|
void addNewRestaurant();
|
|
void updateRestaurantStatus() const;
|
|
void listRestaurantOrders();
|
|
void markOrderReady();
|
|
void listMenuItems() const;
|
|
void addMenuItem() const;
|
|
void removeMenuItem();
|
|
void listCustomerOrders();
|
|
void placeOrder();
|
|
void cancelOrder();
|
|
void listDeliveryAssignments();
|
|
void acceptDeliveryAssignment();
|
|
void confirmDeliveryAssignment();
|
|
void viewProfile();
|
|
};
|
|
|