0% found this document useful (0 votes)
5 views14 pages

Final Report C++

The document outlines a project for a Restaurant Ordering System developed by students at the School of Computer Science & Engineering. It details the system's requirements, objectives, class structure, and UI design, aiming to enhance the ordering experience in Indonesian restaurants by implementing a technology-driven solution similar to that used in China. The project also emphasizes teamwork and the learning experiences of the students involved in the development process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views14 pages

Final Report C++

The document outlines a project for a Restaurant Ordering System developed by students at the School of Computer Science & Engineering. It details the system's requirements, objectives, class structure, and UI design, aiming to enhance the ordering experience in Indonesian restaurants by implementing a technology-driven solution similar to that used in China. The project also emphasizes teamwork and the learning experiences of the students involved in the development process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

High-level Language Programming P

Project Name: Restaurant Ordering System

School : School of Computer Science & Engineering


Major : Computer Science and technology
Student Name : Richie, Yoka Kaka Wuvanka, Joshua Wirya
Wijaya, Morris Claudius Yufongcia
Teacher:
Submission Date : 15 June 2025
1. Requirement Analysis for System
1.1 The Background and Motivation of System
In an era where everything has started to use technology in every aspect,
ordering in restaurants is not like what it used to be. Most restaurants, especially in
China, don't have waiters or a physical menu. Customers are given QR codes which
they could scan to see the menus and order the food.

Not all countries are as advanced as China. In our home country, Indonesia,
only a small portion of restaurants have implemented this program which makes
restaurant owners have to hire more servers to take orders from customers. From this
phenomena, we decided that we would like to further study the ordering program
used in China so that we could bring it back to our country and implement it in every
restaurant in Indonesia.

1.2 System Objectives


By implementing this ordering system, we are hoping to be able to reduce the
chance of miscommunication happening when ordering food, reducing the wait time
when waiting for a server to take our order, an easier order management for the staff,
and a simpler and efficient billing system.

2. Program Analysis
2.1 Key Issues for System

1. Arrangement for Base Classes and Data Members

In this system, the data models are logically organized into individual classes that
represent key entities in a restaurant environment, such as users, menu items, orders,
and tables. Each class contains data members that reflect its real-world attributes. For
example, the User class includes id, username, password, and role to distinguish
between different types of users. The MenuItem class holds information like id,
name, price, and category, allowing items to be grouped and displayed efficiently.
The Order class maintains a list of selected MenuItem objects, the associated tableId,
the total price, and a status indicator. The Table class tracks the table's id, number of
seats, and occupancy status. This careful arrangement of data members ensures that
each object encapsulates all the necessary information, providing a clear and
maintainable structure for the application logic.

2. Class Inheritance Structure and Composition

The class design follows a composition-over-inheritance principle, which is


suitable for the domain. Most of the model classes, such as Menu, Order, and Table,
do not inherit from one another, as they represent separate entities. Instead, they
interact through composition. For example, the Menu class contains a vector of
MenuItem objects, reflecting that a menu is composed of multiple items. Similarly,
the Order class is composed of a list of MenuItem objects that the customer selects.
Composition also appears in the Table class if it holds a reference to the current order
being served. On the other hand, inheritance is used in the user interface portion of
the project, where classes like MainWindow, MenuView, and OrderView inherit
from Qt framework classes such as QWidget or QMainWindow. This allows the
system to take advantage of built-in Qt functionality while extending and customizing
the views to match the needs of the restaurant.

3. Global Functions

Global functions are used sparingly in this project and are reserved for utility tasks
that do not logically belong to any single class. These functions provide support for
commonly used operations such as calculating the total cost of an order, validating
user credentials, or formatting currency values for display. For example, a global
function like calculateTotal can accept a list of MenuItem objects and return the sum
of their prices, which is useful for computing the order total in both the UI and the
backend. To avoid naming conflicts and improve organization, these global functions
can be grouped into a Utils namespace. This separation allows them to be reused
across different components of the system without violating object-oriented
principles or cluttering class definitions with unrelated methods.

4. Files

The project is organized into modular folders for clarity and maintainability. The
main.cpp file launches the application, while the ui/ folder contains interface
components like login, menu, order, and table views. The models/ folder holds core
classes such as User, MenuItem, Order, and Table, each managing specific restaurant
data and behavior. Database operations are handled by the DatabaseManager class,
found in both the models/ and database/ folders. This structure cleanly separates UI,
logic, and data access.

2.2 Duty Assignments

As we have 4 group members, we decided to further divide into 2 smaller


groups, which are the coding group and the UI group. The coding group consisted of
Morris Claudius Yufongcia and Yoka Kaka Wuvanka which they each made the
header file, source code and the main file together. The UI group consists of Richie
and Joshua Wirya Wijaya which have the job of making the UI of the system.
Due to living close to each other, all four of us are able to help each other when
we need help. Since our jobdesk are connected to each other, it is not rare for us to
ask help from another member that is doing the part that connects to our job desk. All
in all, all four of us are able to work together and share the workload in an even
portion and also help each other.

3. Technical Routine
3.1 Runtime Environment
Windows 11, Qt Creator 6.9.1, C make 4.0.2

3.2 General Design


1) Classes for data files

i) “User” class
ii) “Admin” class
iii) “Staff” class
iv) “Customer” class
v) “Menu” class
vi) “MenuItem” class
2) File Processing Workflow

3) UI design
1. Order Classification

Order categories, where you can view all your orders and know which ones are ready,
served, pending, and cancelled.
2) Table Classification

you can see all tables that are available

3) Login System
There was supposed to be a login system, but as you can tell, we failed with the UI,
although we have the code ready.

3.3 Detailed Design

1. Functions and data members in classes

In the user class, the constructor initializes a user object with specific details
such as their ID, username, password, role, and an optional parent object used in Qt's
object hierarchy. After assigning the basic information, it sets up the user's default
permissions based on their role (customer, server, admin).
The table class consists of a setter method. It is used to update the table's
number and seating capacity. Each method first checks if the new value is different
from the current one to avoid unnecessary updates. If the value has changed, it
updates the member variable and emits a corresponding Qt signal .

The order class classifies the type of order. The first one creates a default
order with no specific ID, table assignment, or server. It sets the order's status to
"Pending" and records the current date and time as the order time. The second
constructor allows for more specific initialization by accepting an order ID, a table
ID, and a pointer to the server (User) handling the order. It also sets the status to
"Pending" and timestamps the order with the current time. Both constructors ensure
that every new order starts in a consistent initial state, ready to be processed.
These two functions are setter methods in the MenuItem class, used to update
the name and description of a menu item. Each method first checks whether the new
value is different from the existing one to avoid redundant updates. If a change is
detected, the internal variable is updated and a corresponding Qt signal
(nameChanged or descriptionChanged) is emitted. These signals are used to inform
other parts of the application—typically the user interface—that the data has
changed, allowing the display to update automatically. This ensures real-time
synchronization between the backend data and the frontend view.

2. UI Design

This code builds part of a user interface in Qt to manage tables in a restaurant


system. It starts by creating a horizontal layout (QHBoxLayout) that functions like a
toolbar. On this toolbar, a QComboBox named statusFilter is added, allowing the user
to filter tables by status (Available, Occupied, Reserved.). Then, three buttons "New
Table", "Edit Table", and "Delete Table" are added for managing table entries. A
stretch is added to push the buttons to the left and maintain spacing.

Below the toolbar, a QTableWidget is created to display a list of tables. It has five
columns: ID, Number, Capacity, Status, and Current Order. The table is set up to
stretch columns to fit the window size, allow only single row selection, and prevent
direct editing of cells. Finally, both the toolbar and the table are added to the main
layout (mainLayout), integrating them into the overall window or view. This section
of code provides the core UI for viewing and managing restaurant tables efficiently.
This code creates the user interface for managing orders in the application
using Qt widgets. It starts with a QTableWidget called orderTable, which is
configured to display six columns: ID, Table, Time, Status, Items, and Total. These
columns present key details of each order. The table is set to automatically stretch
columns to fit the window width, allow only full row selection, and disable in-place
editing of cells ensuring a clean, consistent, and controlled user experience.

Below the order table, a horizontal layout (QHBoxLayout) is created for action
buttons: New Order, Edit Order, and Delete Order. These buttons let users manage
the order list interactively. Finally, a QLabel named statusLabel is added at the
bottom of the layout, aligned to the center, which can be used to show messages or
updates ( Order saved, No order selected). Overall, this code builds a structured and
interactive section of the UI for viewing and handling restaurant orders.
This code defines the user interface for managing the menu items in a
restaurant system. It begins by creating a dropdown filter (QComboBox) called
categoryFilter, which allows users to filter menu items based on their category.
Initially, it includes the option "All Categories", enabling the user to view all items
regardless of classification. A label and the filter dropdown are added to a horizontal
layout called filterLayout, which is then placed into the main layout (mainLayout).

Below the filter, a QTableWidget named menuTable is created to display the


menu items in a structured table format. It has five columns: ID, Name, Description,
Price, and Category, giving a comprehensive view of each item. The table is set up to
stretch columns to fill the window, allow entire row selection, and prevent editing
within the table itself, preserving data integrity and UI clarity.

At the bottom, a horizontal layout for buttons is added with Add Item, Edit
Item, and Delete Item options. These buttons allow users to manage the menu by
adding new entries, updating existing ones, or removing items. Together, this UI
section enables efficient and user-friendly management of the restaurant's menu
catalog.
4. Programming Progress
Phases of Mission Period Planned Completion Actual Completion
Determining the topic 2025.06.1-2025.06.04 Survey the interesting Finish our proposal
and submit the topics, and write the and decide the divide
proposal proposal. of work.
Build up the basic 2025.06.05-2025.06.07 Start on user class Finished on both
classes and derived and table class. user and table class.
classes.
Finishing the rest of 2025.06.07-2025.07.10 Finish the order, Finished order,
classes menuitem, and menuitem, and
menu class menu class.
Making UI on QT 2025.06.08-2025.06.11 Making the UI. Only some part of
the code can
actually be
implemented in the
UI while the rest
cannot be accessed
in the UI.

5. Testing Report
5.1 Function testing

1.Menu classification
2. Menu classification

3. Table classification
6. Personal Summary

Yoka Kaka Wuvanka


Through this final project, I gained valuable experience and knowledge about
C++. I deepened my understanding of concepts such as class inheritance,
encapsulation, operator overloading, and file handling, and I learned how to apply
them in a real-world project. In the process, I also reviewed and reinforced many
topics we covered this semester, which helped strengthen my foundation in C++
programming.

In addition to improving my technical skills, this project made me appreciate


the importance of teamwork and communication. From planning the features to
writing and debugging the code, every step required collaboration and discussion
with my group members. We held regular meetings to share our ideas, solve
problems together, and continuously improve the quality of our code. We encouraged
and supported each other, which made the entire process smoother and more
enjoyable.
However, I also realized that our current skills still have limitations. There were some
advanced features we initially hoped to include in our program, but we couldn’t
implement them due to a lack of technical knowledge or experience. This motivated
me to want to continue learning and improving so that next time, we can build a more
complete and advanced system.

After putting in so much time and effort, it was truly rewarding to see our
program working well in the end. This project has shown me how meaningful and
efficient teamwork can be, and I look forward to more opportunities for collaborative
projects in the future, where we can challenge ourselves even further.
Richie
In this last project, I have learned many new things, from new code functions
to learning how to make a UI for an app. Although this project is nothing but a flaw
and failure, we believe that this idea possesses a good potential and we hope that we
could revisit this idea and project one day in the future with more preparation and
knowledge and we hope to be able to make this project successful.\

Joshua Wirya Wijaya


Through this final project, I learned a lot about C++. I got better at using things
like class inheritance, encapsulation, operator overloading, and file handling. I also
learned how to use these skills in a real project. While working on the project, I
reviewed many topics we learned during the semester, which helped me understand
them more clearly and remember them better. At the same time, I realized that we
still have some things to learn. There were a few advanced features we wanted to add,
but we couldn’t do it because we didn’t know how yet. This made me want to keep
learning so that in the future, we can build even better programs.

Morris Claudius Yufongcia


For our final project, We built a restaurant ordering system using C++ and the
Qt framework. It’s a desktop application that helps manage tables, menu items, and
orders with a simple user interface. The system supports different user roles like
Admin, Manager, Server, and Kitchen, each with their own permissions. We
designed and connected backend classes like User, Order, and MenuItem with
the UI using Qt’s signals and slots, and handled data storage through a
DatabaseManager. This project gave us practical experience with C++, GUI
design, and structuring a real application, while also teaching me how to break down
and manage a full system from scratch.

7. Reference

You might also like