This project is a console-based Restaurant Order and Management System developed using the C++ language. The project was prepared as a term project to practically demonstrate the principles of Object-Oriented Programming (OOP).
The main goal of the application is to model a real-life scenario using the fundamental concepts of OOP (Inheritance, Polymorphism, Encapsulation). The system consists of two main modules: customer and restaurant management.
Users can access the system to:
- List different restaurants,
- Browse menus,
- Create orders and view order history.
Managers can:
- Add new items to the menu,
- Add new employees to the system,
- List employee information.
- Classes: Well-defined classes such as
Restaurant,User,Customer,Employee,Manager,MenuItem,Orderare present. - Inheritance:
CustomerandEmployeeclasses are derived from theUserclass.ManagerandDeliveryPersonclasses are derived from theEmployeeclass.FoodItemandDrinkItemclasses are derived from theMenuItemabstract class.
- Polymorphism:
- Thanks to
virtualfunctions likedisplayInfo()andwork(), the correct method of the derived class is called via the base class pointer. - The
MenuItempointer array can hold bothFoodItemandDrinkItemobjects.
- Thanks to
- Abstract Classes: Abstract classes like
MenuItemandEmployeeare used to ensure that certain functions (showItem(),work()etc.) are compulsorily implemented by derived classes. - Encapsulation: Class data members are defined as
privateorprotected, and controlled access to these members is provided only through thepublicinterface (getter/setter methods).
Note: In line with the requirements of this project, STL (Standard Template Library) collections such as
std::vectorandstd::listwere not used to understand the basics of memory management. Instead, dynamic arrays and manual memory management (new[],delete[]) were preferred.
You need a C++ compiler (e.g., g++) to compile and run the project.
-
Open your terminal/command prompt and navigate to the project folder (e.g., after cloning from GitHub):
cd path/to/your/project-folder # Replace with your actual project directory path
-
Compile all
.cppfiles using the following command:g++ -o restaurant_app main.cpp user.cpp customer.cpp employee.cpp manager.cpp delıveryperson.cpp restaurant.cpp order.cpp menuıtem.cpp foodıtem.cpp drınkıtem.cpp
-
After compilation is complete, run the application:
./restaurant_app.exe