You are on page 1of 92

TILAK EDUCATION SOCIETY’S

J. K. COLLEGE OF SCIENCE & COMMERCE


(Affiliated to University of Mumbai) Project Report
On
“Food Ordering System’’
PROJECT WORK SUBMITTED IN PARTIAL
FULLFILLMENT OF THEREQUIREMENTS FOR THE
AWARD OF THE DEGREE OF
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
SUBMITTED BY
AJIT RAMSWARATH YADAV

GUIDED BY
Prof TURUPTI DESHMUKH
ACADEMIC YEAR
2022-2023

2
ABSTRACT

3
Online Food Ordering System is designed primarily for use in the food delivery industry. This system
will allow hotels and restaurants to increase scope of business by reducing the labour cost involved. The
system also allows to quickly and easily manage an online menu which customers can browse and use to
place orders with just few clicks. Admin employees then use these orders through an easy to navigate
graphical interface for efficient processing. The online food ordering system provides convenience for
the customers. This system increases the takeaway of foods than visitors.

The online food ordering app set up menu online and the customers easily places the order with a simple
click. Also, with a food menu online you can easily track the orders, maintain customer s database and
improve your food delivery service. This system allows the user to select the desired food items from the
displayed menu. The user orders the food items. The user’s details are maintained confidential because it
maintains a separate account for each user. An id and password are provided for each user. Therefore, it
provides a more secured ordering.

4
ACKNOWLEDEMENT

5
Leaders are those who put themselves down to pull others up in life. Those leaders are no one but our
professors. So, I would like to take this opportunity to thank those dynamic leaders who have helped me in
visualizing this project and bringing into reality.

I would like to express my deepest gratitude to my project guide Prof- TRUPTI DESHMUKH for

providing her precious timely assistant to my query and solving my doubts. Her words of

wisdom has encouraged so much and kept me in right track for completion of this project.

Thanking You, Ajit Yadav

6
DECLARATION

7
I here by declare that the project entitled, “FOOD ORDERING SYSTEM” done at J K COLLEGE OF
SCIENCE & COMMARCE, has not been in any case duplicated to submit to any other university for the
award of any degree. To the best of my knowledge other than me, no one has submitted to any other
university.

The project is done in partial fulfilment of the requirements for the award of degree of
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY) to be submitted as final
semester project as part of our curriculum.

Name and Signature the Student

Ajit Yadav

8
Chapters Title

1 I. Introduction 1.1 Background.


1.2 Objectives
1.3 Purpose, Scope and Applicability
• 1.3.1 Purpose
• 1.3.2 Scope
• 1.3.3 Applicability
1.4 Achievements
1.5 Organisation Of Report

II. Survey Of Technologies


2

3 III. Requirement and Analysis


3.1 Problem Definitions
3.2 Requirement Specification
3.3 Planning And Scheduling
3.4 Software and Hardware Requirements.
3.5 Preliminary Product Description
3.6 Conceptual Models
4 IV. System Design
4.1. Basic Modules
4.2 Data Design
4.3 Procedural Design
4.4 User Interface Design
4.5 Security Issues
4.6 Test Cases Design
9
INDEX

10
5 V. Implementation And Testing
5.1 Implementation Approaches
5.2 Coding Details and Code Efficiency
5.2.1 Code Efficiency
5.3 Testing Approach
5.3.1 Unit Testing
5.3.2 Integrated Testing
5.3.3 Beta Testing

6 VI. Results And Discussion


6.2 User Documentation
7 VII. Conclusions
7.1 Conclusion
7.1.1 Significance of the System
7.2 Limitations of the System
7.3 Future Scope of the Project
REFERENCES

11
Chapter No.1
Introduction

12
The online food ordering system is one of the latest servicers most fast-food restaurants in the western
world are adopting. With this method, food is ordered online and delivered to the customer. Customers
pay with their credit cards, although credit card customers can be served even before they make payment
either through cash. So, the system designed in this project will enable customers go online and place
order for their food.

Due to the great increase in the awareness of internet and the technologies associated with it, several
opportunities are coming up on the web. So many businesses and companies now venture into their
business with ease because of the internet. One of such business that the internet introduced is an online
food ordering application.

In today’s age of fast food and take out, many restaurants have chosen to focus on quick preparation and
speedy delivery of orders rather than offering a rich dining experience. It is possible for anybody to order
any goods via the internet and have the goods delivered at his/her doorsteps. Once an order placed in the
app that will be designed, it is placed into the database and then retrieved, in pretty much real-time, by a
desktop application on the admin send.

Within this application, all items in the order are displayed, along with their corresponding options and
delivery details, in a concise and easy to read manner. This allows the admin employees to quickly go
through the orders as they are placed and produce the necessary items with minimal delay and confusion.

13
1.1. Background

14
This Case study looks at the problem of setting up a fast-food restaurant. In existing system there are few
problems:

 For placing any orders customers have to visit hotels or restaurants to know about food items and then
place order and pay. In this method time and manual work is required.
 While placing an order over the phone, customer lacks the physical copy of the menu item, lack of visual
confirmation that the order was placed correctly.
 Every restaurant needs certain employees to take the order over phone or in-person, to offer a rich dining
experience and process the payment. In today's market, labour rates are increasing day by day making it
difficult to find employees when needed.

Hence, to solve this issue, what I propose is an "Online Food Order System, originally designed for small-
scale business-like College Cafeterias, Fast Food restaurant or Take-Out, but this system is just as
applicable in any food delivery industry. The main advantage of my system is that it greatly simplifies the
ordering process for both the customer and the restaurant and also greatly lightens the load on the load on
the restaurant's end, as the entire process of taking orders is automated.

Anticipated Benefits are:

 This will minimize the number of employees at the back of the counter.
 The system will help to reduce labour cost involved system will be less probable to make mistake, since
it's a machine.
 This will avoid long queues at the counter due to the speed of execution and number of uses.
 Optimum screens to accommodate the maximum throughput.

15
1.2. Objectives

16
The main objective of the Online Food Ordering System is to manage the details of menu Category,
Food, Delivery Address, Order, payment and also automate the existing manual system with the help of
advance computerized software so, that valuable data can be stored for longer period with easy accessing
and manipulation of the same.

The registered user can access the account with valid credentials. User can surf the food item according
to categories, Cash and card payment options are available to user. User can track their orders with the
food details. In Online Food Ordering System Admin can handle the functionalities like add new food
items, edit/delete food items, Enable/Disable the food items according to season and availability. Admin
have authority to view order details and update the delivery status of food.
The payment transaction and user details are also viewable to admin.

1.3 Purpose, Scope and Applicability

1. In today’s age of fast food and take-out, many restaurants have chosen to focus on quick preparation and

speedy delivery of orders rather than offering a rich dining experience. Until very recently, all of these

delivery orders were placed over the phone, but there are many disadvantages to this system. First, the

customer must have a physical copy of the restaurant’s menu to look at while placing their order and this

menu must be up to date. While this expectation is not unreasonable, it is certainly inconvenient.

Second, the orders are placed using strictly oral communication, which makes it far more difficult for the

customer to receive immediate feedback on the order they have placed. This often leads to confusion and

incorrect orders. The current system is also inconvenient for the restaurant itself, as they must either have a

dedicated staff member to answer the phone and take orders, or some employees must perform double-duty,

distracting them from their regular tasks.

What I propose is an online ordering system, originally designed for use in college cafeterias, but

just as applicable in any food delivery industry. The main advantage of my system is that it greatly
17
simplifies the ordering process for both the customer and the restaurant. When the customer visits the

ordering webpage, they are presented with an interactive and up-to-date menu, complete with all available

options and dynamically adjusting prices based on the selected options. After making a selection, the item is

then added to their order, which the customer can review the details of at any time before checking out. This

provides instant visual confirmation of what was selected and ensures that items in the order are, in fact,

what was intended.

The system also greatly lightens the load on the restaurant’s end, as the entire process of taking orders is

automated. Once an order is placed on the webpage, it is placed into the database and then retrieved, in

pretty much real-time, by a desktop application on the restaurant’s end. Within this application, all items in

the order are displayed, along with their corresponding options and delivery details, in a concise and easy to

read manner. This allows restaurant employees to quickly go through the orders as they are placed and

produce the necessary items with minimal delay and confusion.

While there are already a few systems like this in existence, all those I have encountered have been

designed specifically for one restaurant, and thus cater only to their unique needs. Perhaps the greatest

advantage of my system is its flexibility. The web order forms are built dynamically from the database,

which can be managed using a graphical user interface. This allows the restaurant employees to not only set

up and customize the system on their own, but also allows them to make changes to the menu in real time.

For this reason, the exact same system can be used by numerous businesses with absolutely no modification

to the code itself, which greatly increases its usefulness.

Feasibility

At the present moment, the system is entirely functional, save the few minor bugs which are bound

to present themselves during more extensive testing. A user is currently able to register and log in to

the website and place an order. That order is then displayed, correctly and completely, in the order

retrieval desktop application. Much of what is left to do focuses not on improving functionality, but
18
rather on improving user experience by creating richer graphical interfaces for the user to interact with and

modifying the application’s icons and color schemes to make them more pleasing to look at and use. For

this reason, I feel that completing the project in the required timeframe is very feasible, particularly if I am

able to adhere to the dates outlined in Figure 1, below.

In addition to time, a second factor influencing feasibility is resources, which also should not be a concern

here. The online ordering system is structured like a fairly standard web application, and as such requires no

special hardware and only basic software, namely web and database servers, to function properly.

Therefore, I anticipate finishing all of the required work on time or, ideally, ahead of schedule, leaving me

with time to investigate a few additional features I would like to add but are not integral to the system.

19
1.4 Achievements

20
During this development phase of the projects, I learned many things which didn't get to learn in my
curricular year. The programming language which used in my project is Java is the booming language
now a days. In Android, the XML is used to implement UI-related data, and it's a lightweight markup language
that doesn't make layout heavy. The database which I used for my project is Firebase. These all platforms
and languages were totally new for me but tried my best to learn them and complete my project. I
learned the concept of Build gradle, opensource and many more.

1.5 Organization of Report

The topic which we covered in the next chapters is to identify which technologies is use while implementing
the project and gathering the requirements of the project, analysed the project and applying the test cases to
check the validity of the project, find the software and hardware requirement, design the UML diagrams,
design modules, design the system and lastly implementing and testing the project simultaneously.

21
Chapter No.2
Survey Of Technology

22
VS code is an only IDE for the development of system . VS code mainly works on multiple platforms .
The structure of the system can be divided into three main logical components. The first component must
provide some form of menu management, allowing the restaurant to control what can be ordered by
customers. The second component is the web ordering system and provides the functionality for customers
to place their order and supply all necessary details. The third and final logical component is the order
retrieval system. Used by the restaurant to keep track of all orders which have been placed, this component
takes care of retrieving and displaying order information, as well as updating orders which have already
been processed.

• Languages: Java

• Database System: Firebase.

VS code an open source and Linux-based operating system for laptop or computer devices such as and
tablet computers.
Functional Requirements

As can be seen in the system model diagramed above, each of the three system components essentially

provides a layer of isolation between the end user and the database. The motivation behind this isolation is

twofold. Firstly, allowing the end user to interact with the system through a rich interface provide a much

more enjoyable user experience, particularly for the non-technical users which will account for the majority

of the system’s users. In addition, this isolation layer also protects the integrity of the database by

preventing users from taking any action outside those which the system is designed to handle. Because of

this design pattern, it is essential to enumerate exactly which functions a user will be presented and these

functions are outlined below, grouped by component.

23
Chapter No.3

24
Requirement And Analysis

3.1 Problem Definition:

The system aggregator is an application that combines various thematic platforms in order to increase
their level of sales and ensure the convenience of the choice of dishes and drinks by users. A distinctive
feature of the application is a single design, user-friendly interface. In this system where customer can
make an order should be as simple as few clicks on the device. And it should be easy to understand and
informative about the options and choices the users have.

As industries are fast expanding, people are seeking for more ways to purchase products with
much ease and still maintain cost effectiveness. The vendors need to purchase the products in
order to sell to end users. The manual method of going to their local food sales outlets to purchase
food is becoming obsolete and more tasking. Food can be ordered through the internet and
payment made without going to the restaurant or the food vendor. So, there is need for a wide
range of publicity and enabling direct order, processing and delivering of food through online
system. For this system, there will be a system administrator who will have the rights to enter the
menu with current prevailing prices

3.2 Requirement Specifications:


A software requirements specification is a complete description of the behaviour of a system to be
developed. It includes a set of use cases that describe all the interactions the users will have with the
software. We studied the requirement and specification provided by client and list out all the functional
requirement of website that would be implemented from our side. We also suggest client some good
functionality like contact import.

25
3.3 Planning and Scheduling:
It is type of bar chart that Illustrates a project schedule. Also illustrate start and finish date of the
project as mentioned above. This type of chart is a graphical representation about the progress of
the project. Decides the standard of the system. This chart shows planned and actual progress for
a number of tasks performed during the development of the project against the horizontal time
scale. It is effective and easy to read and understandable method of indicating the status of the
task compared to the planned progress of the product project.

26
GANTT CHART

3.4 Software and Hardware Requirements:

27
 SOFTWARE REQUIRED
1. VS code
• Software Full Name: VS code
• Full Setup Size: 550 MB
• Latest Version Release Added On: VS code
• Developers: VS code

28
2. Java Programming language
• Software Name: Java Development Kit (JDK)
• Latest Version: JDK 16

 Hardware Required For using Application

GlashFish Version (min 4.1 Jelly Bean),

• Ram: 2GB.

 SPECIFICATION OF COMPUTER / DESKTOP / LAPTOP


1. Computer System
• Operating System: Window 10 Home
• Processor: Intel Core i3 7th gen
• Graphic Card: NVidia GeForce 940Mx
• Ram: 12GB DDR4 3200MHz
• System Architecture: 64-Bits

3.5 Preliminary description of the Product:

• This application will provide, quality food at their favourite store or restaurant. Also an advantage of
keeping a track order, and admin can maintain customer's database and advance the food delivery
system.
• The main aim of this application is, it is designed to provide customer for a way to place an
order at a restaurant over the internet.
• Also provide information such as category, name, price, image, description and so on.
• Gives information your food calories, vitamins, fats etc it contains.

29
3.6 Conceptual Model:
Spiral model is one of the most important Software Development Life Cycle models, which provides
support for Risk Handling. In its diagrammatic representation, it looks like a spiral with many loops. The
exact number of loops of the spiral is unknown and can vary from project to project. Each loop of the
spiral is called a Phase of the software development process. The exact number of phases needed to
develop the product can be varied by the project manager depending upon the project risks. As the
project manager dynamically determines the number of phases, so.
Each phase of the Spiral Model is divided into four quadrants as shown in the above figure. The
functions of these four quadrants are discussed below
1. Objectives determination and identify alternative solutions: Requirements are gathered from the
customers and the objectives are identified, elaborated, and analysed at the start of every phase. Then
alternative solutions possible for the phase are proposed in this quadrant.
2. Identify and resolve Risks: During the second quadrant, all the possible solutions are evaluated to
select the best possible solution. Then the risks associated with that solution are identified and the
risks are resolved using the best possible strategy. At the end of this quadrant, the Prototype is built for
the best possible solution.
3. Develop next version of the Product: During the third quadrant, the identified features are developed
and verified through testing. At the end of the third quadrant, the next version of the software is
available.
4. Review and plan for the next Phase: In the fourth quadrant, the Customers evaluate the so far
developed version of the software. In the end, planning for the next phase is started.

30
31
Chapter No.4
System Design
4.1. Basic Modules:
• Administrator module
• Customer Module Manager
• Module Meal
• Deliver module

4.1.1 Administrator Module


This module is used to create usernames and passwords by admin. Admi can view the information about
the user or delete or edit the all details about the manager and customer.

4.1.2 Customer Module


This Functionalities provided: • View product’s
list
• Register
• Place orders

4.1.3 Manager Module


This Functionalities provided:
• Create product categories and functionalities,
• Edit / delete product categories and descriptions,
• View and manage orders and sales report,

4.1.4 Meal delivers Module Functionalities provided:


• View pending orders and delivery details
• Confirm order delivery

4.2. Data Design:

4.2.1 Schema Design

There will be 4 tables in a database

32
 Register Table
 Add Product Table
 Category Table  Cart Table

Column Name
firstname Varchar(50)

Lastname Varchar(50)

Gender Varchar(50)

mobileno Varchar(50)

Address Varchar(50)

City Varchar(50)

PinCode int

Email Varchar(50)

Password Varchar(20)

ConPassword Varchar(20)

Column Name DataType

Id Int

Category Varchar(50)

Name Varchar(50)

33
4.2.2 Data Integrity and Constraints

Register Table

Add Product Table

34
Price Money

Image Varchar(max)

Details Varchar(50)
Column Name DataType

CategoryId int
CategoryId Int

Cname Varchar(50)

Category Table

Column Name DataType

Slno Varchar(20)

Id Varchar(50)

Name Varchar(50)

UserName Varchar(50)

Image Varchar(50)

Quantity Varchar(50)

35
Cart Table

36
Price money

TotalPrice Varchar(50)
4.3. Procedural Design

4.3.1 Logic Diagrams

Data Flow Diagram (DFD):

A data flow diagram is a graphical view of how data is processed in a system

37
38
39
4.3.2 Use Case Diagram

40
41
4.4. Entity Relationship Diagram:

42
ER Diagram stands for Entity Relationship Diagram, also known as ERD is a diagram that displays
the relationship of entity sets stored in a database. In other words, ER diagrams help to explain the
logical structure of databases. ER diagrams are created based on three basic concepts: entities,
attributes and relationships.

43
44
4.5. Class Diagram:

45
Class diagrams are fundamental to the object modelling process and model the static structure of a system.
Depending on the complexity of a system, you can use a single class diagram to model an entire system, or
you can use several class diagrams to model the components of a system. Class diagrams are the blueprints
of your system or subsystem. You can use class diagrams to model the objects that make up the system, to
display the relationships between the objects, and to describe what those objects do and the services that
they provide.

4.6. Sequence Diagram:

The designed sequence diagram illustrates the series of events that occurs in Online Food
Ordering System. In this illustration, the actors are represented by a stick man and the transactions or classes are
represented by objects. It will give you clear explanation about the behaviour of a Food Ordering Application in terms
of processing the flow of instructions.

46
47
4.7. Activity Diagram:

 Activity Diagram for Place Order using Mobile Phone

48
 Activity Diagram for Generate Report

49
 Activity Diagram for Update Menu Info

50

Activity Diagram for View Order Queue


 Activity Diagram for Void Order

51

Activity Diagram for Add Menu Info

 Activity Diagram for Delete Menu Info

Activity Diagram for Make Payment

52

 Activity Diagram for Validate Order

53
<?php include('partials-front/menu.php'); ?>

<?php
//CHeck whether id is passed or not
if(isset($_GET['category_id']))
{
//Category id is set and get the id
$category_id = $_GET['category_id'];
// Get the CAtegory Title Based on Category ID
$sql = "SELECT title FROM tbl_category WHERE id=$category_id";
//Execute the Query
$res = mysqli_query($conn, $sql);

//Get the value from Database


$row = mysqli_fetch_assoc($res);
//Get the TItle
$category_title = $row['title'];
}
else
{
//CAtegory not passed
//Redirect to Home page
header('location:'.SITEURL); }

54
Chapter No.5
Implementation and Testing

5.1 Implementation Approach


Ordering is implemented using popular MVP (Model View Presenter) which is a pattern to use in VS
code to organize the data.

5.2 Coding Details and Code Efficiency

5.2.1 Code Details


package com.akash.foodies;
?>

<!-- fOOD sEARCH Section Starts Here -->


<section class="food-search text-center">
<div class="container">

<h2><a href="#" class="text-white">Foods on "<?php echo


$category_title; ?>"</a></h2>

</div>
</section>
<!-- fOOD sEARCH Section Ends Here -->

<!-- fOOD MEnu Section Starts Here -->


<section class="food-menu" >
<div class="container">
<h2 class="text-center">Food Menu</h2>

<?php

//Create SQL Query to Get foods based on Selected CAtegory


$sql2 = "SELECT * FROM tbl_food WHERE category_id=$category_id";
//Execute the Query
$res2 = mysqli_query($conn, $sql2);

//Count the Rows


$count2 = mysqli_num_rows($res2);

//CHeck whether food is available or not


if($count2>0)
{
//Food is Available
while($row2=mysqli_fetch_assoc($res2))
{
$id = $row2['id'];
$title = $row2['title'];
$price = $row2['price'];
$description = $row2['description'];
$image_name = $row2['image_name'];
?>
<div class="food-menu-box">
<div class="food-menu-img">
<?php
if($image_name=="")
{
//Image not Available
echo "<div class='error'>Image not
Available.</div>";
}
else
{
//Image Available
?>
<img src="<?php echo SITEURL;
?>images/food/<?php echo $image_name; ?>" alt="Chicke Hawain Pizza"
class="imgresponsive img-curve">
<?php
}
?>

</div>

<div class="food-menu-desc">
<h4><?php echo $title; ?></h4>
<p class="food-price">₹ <?php echo $price; ?></p>
<p class="food-detail">
<?php echo $description; ?>
</p>
<br>

<a href="<?php echo SITEURL;


?>order.php?food_id=<?php echo $id; ?>" class="btn btn-primary">Order Now</a>
</div>
</div>

<?php
}
} else
{
//Food not available echo "<div
class='error'>Food not Available.</div>";
}

?>
<div class="clearfix"></div>

</div>
</section>
<!-- fOOD Menu Section Ends Here -->

<?php include('partials-front/footer.php'); ?>

MainMenu
<?php include('partials/menu.php'); ?>

<!-- Main Content Section Starts -->


<div class="main-content">
<div class="wrapper">
<h1>Manage Admin</h1>
<br />
<?php
if(isset($_SESSION['add']))
{ echo $_SESSION['add'];
//Displaying Session Message
unset($_SESSION['add']); //REmoving Session Message }

if(isset($_SESSION['delete']))
{
echo $_SESSION['delete'];
unset($_SESSION['delete']);
}
if(isset($_SESSION['update']))
{ echo
$_SESSION['update'];
unset($_SESSION['update']);
}
if(isset($_SESSION['user-not-
found']))
{ echo
$_SESSION['user-not-found'];
unset($_SESSION['user-not-found']); }
if(isset($_SESSION['pwd-not-
match']))
{ echo
$_SESSION['pwd-not-match'];
unset($_SESSION['pwd-not-match']); }
if(isset($_SESSION['change-
pwd']))
{ echo
$_SESSION['change-pwd'];
unset($_SESSION['change-pwd']); }

?>
<br><br><br>

<!-- Button to Add Admin -->


<a href="add-admin.php" class="btn-primary">Add Admin</a>
<br /><br /><br />

<table class="tbl-full">
<tr>
<th>S.N.</th>
<th>Full Name</th>
<th>Username</th>
<th>Actions</th>
</tr>

<?php
//Query to Get all Admin
$sql = "SELECT * FROM tbl_admin";
//Execute the Query
$res = mysqli_query($conn, $sql);
//CHeck whether the Query is Executed of Not
if($res==TRUE)
{
// Count Rows to CHeck whether we have data in
database or not
$count = mysqli_num_rows($res); // Function to get
all the rows in database

$sn=1; //Create a Variable and Assign the value


//CHeck the num of rows
if($count>0)
{
//WE HAve data in database
while($rows=mysqli_fetch_assoc($res))
{
//Using While loop to get all the data from
database.
//And while loop will run as long as we have
data in database

//Get individual DAta


$id=$rows['id'];
$full_name=$rows['full_name'];
$username=$rows['username'];
//Display the Values in our Table
?>

<tr>
<td><?php echo $sn++; ?>. </td>
<td><?php echo $full_name; ?></td>
<td><?php echo $username; ?></td>
<td>
<a href="<?php echo SITEURL;
?>admin/update-password.php?id=<?php echo $id; ?>" class="btn-primary">Change
Password</a>
<a href="<?php echo SITEURL;
?>admin/update-admin.php?id=<?php echo $id; ?>" class="btn-secondary">Update
Admin</a>
<a href="<?php echo SITEURL;
?>admin/delete-admin.php?id=<?php echo $id; ?>" class="btn-danger">Delete
Admin</a>

64
</td>
</tr>

<?php

}
} else
{
//We Do not Have Data in Database
}
}

?>

</table>

</div>
</div>
<!-- Main Content Setion Ends -->

<?php include('partials/footer.php'); ?>

Admin(Chef Resignation Page)


<?php include('partials/menu.php'); ?>
<div class="main-content">
<div class="wrapper">
<h1>Manage Food Category</h1>
<br /><br />
<?php
if(isset($_SESSION['add']))

65
{ echo
$_SESSION['add'];
unset($_SESSION['add']); }
if(isset($_SESSION['remove']))
{ echo $_SESSION['remove'];
unset($_SESSION['remove']
);
}

if(isset($_SESSION['delete']))
{
echo $_SESSION['delete'];
unset($_SESSION['delete']);
}
if(isset($_SESSION['no-category-
found']))
{ echo $_SESSION['no-
category-found'];
unset($_SESSION['no-category-found']); }

if(isset($_SESSION['update']))
{ echo
$_SESSION['update'];
unset($_SESSION['update']);
}

if(isset($_SESSION['upload']))
{ echo
$_SESSION['upload'];
unset($_SESSION['upload']);
}
if(isset($_SESSION['failed-
remove']))
{ echo
$_SESSION['failed-remove'];
unset($_SESSION['failed-remove']);

66
}

?>
<br><br>

<!-- Button to Add Admin -->


<a href="<?php echo SITEURL; ?>admin/add-category.php"
class="btn-primary">Add Category</a>

<br /><br /><br />


<table class="tbl-full">
<tr>
<th>S.N.</th>

67
<th>Title</th>
<th>Image</th>
<th>Featured</th>
<th>Active</th>
<th>Actions</th>

68
</tr>

<?php

//Query to Get all CAtegories from Database


$sql = "SELECT * FROM tbl_category";
//Execute Query
$res = mysqli_query($conn, $sql);
//Count Rows
$count = mysqli_num_rows($res);
//Create Serial Number Variable and assign value as 1
$sn=1;

//Check whether we have data in database or not


if($count>0)
{
//We have data in database
//get the data and display
while($row=mysqli_fetch_assoc($res))
{
$id = $row['id'];
$title = $row['title'];
$image_name = $row['image_name'];
$featured = $row['featured'];
$active = $row['active'];
?>

<tr>
<td><?php echo $sn++; ?>. </td>
<td><?php echo $title; ?></td>
<td>

<?php
//Chcek whether image name is

available or not

69
if($image_name!="")
{

70
//Display the Image
?>

<img src="<?php echo SITEURL;


?>images/category/<?php echo $image_name; ?>" width="100px" >

<?php
}
else
{
//DIsplay the
MEssage echo "<div
class='error'>Image not Added.</div>";
}
?>

</td>

<td><?php echo $featured; ?></td>


<td><?php echo $active; ?></td>
<td>
<a href="<?php echo SITEURL;
?>admin/update-category.php?id=<?php echo $id; ?>" class="btn-secondary">Update
Category</a>
<a href="<?php echo SITEURL;
?>admin/delete-category.php?id=<?php echo $id; ?>&image_name=<?php echo
$image_name; ?>" class="btn-danger">Delete Category</a>
</td>
</tr>

<?php

}
}
else
{
//WE do not have data
//We'll display the message inside table
?>

<tr>
<td colspan="6"><div class="error">No Category

71
Added.</div></td>
</tr>
<?php
}

?>

</table>
</div>

</div>

<?php include('partials/footer.php'); ?>

Chef Login Page


<?php include('../config/constants.php'); ?>

<html>
<head>
<title>Login - Food Order System</title>
<link rel="stylesheet" href="../css/admin.css">
<style>.bg-image::before {opacity:0.4}</style>
</head>

<body class="bg-image"
style="background:lineargradient(rgba(255,255,255,.5),
rgba(255,255,255,.5)), url(../images/bg12.jpg);background-size:cover;">

<div class="login" style="background-color:#dddddd; border-radius:


25px;opacity:80%">
<h1 class="text-center">Admin Login</h1>
<br><br>

<?php
if(isset($_SESSION['login']))
{
echo $_SESSION['login'];
unset($_SESSION['login']);
}

72
if(isset($_SESSION['no-login-
message']))

73
{ echo
$_SESSION['no-login-message'];
unset($_SESSION['no-login-message']);
}
?>

<!-- Login Form Starts HEre -->


<form action="" method="POST" class="text-center">
Username <br>
<input type="text" name="username" placeholder="Enter
Username"><br><br>

Password <br>
<input type="password" name="password" placeholder="Enter
Password"><br><br>

<input type="submit" name="submit" value="Login" class="btn-primary"


style="padding:7px;width:100px;border-radius:6%;border:1px solid black">
<br><br>
</form>
<!-- Login Form Ends HEre -->

</div>

</body>
</html>

<?php

//CHeck whether the Submit Button is Clicked or NOt


if(isset($_POST['submit']))
{
//Process for Login
//1. Get the Data from Login form
$username = $_POST['username'];
$password = md5($_POST['password']);

//2. SQL to check whether the user with username and password exists or
not
$sql = "SELECT * FROM tbl_admin WHERE username='$username' AND
password='$password'";

75
$res = mysqli_query($conn, $sql);

//4. COunt rows to check whether the user exists or not


$count = mysqli_num_rows($res);

if($count==1)
{
//User AVailable and Login Success
// $_SESSION['login'] = "<div class='success'>Login
Successful.</div>";
$_SESSION['user'] = $username; //TO check whether the user is
logged in or not and logout will unset it
//REdirect to HOme Page/Dashboard
header('location:'.SITEURL.'admin/');
}
else
{
//User not Available and Login FAil
$_SESSION['login'] = "<div class='error text-center'>Username or
Password did not match.</div>";
//REdirect to HOme Page/Dashboard
header('location:'.SITEURL.'admin/login.php'); }

}
?>

5.2.2 CODE EFFICIENCY

1. I have tried to make code as efficient as I can by following some simpletricks which
are as follow
2. System has if, else statements with condition that has high pliability to get triggered in
if block in order to reduce the execution time.
3. System has all redundant codes return as a function which makes the code more
readable and reduced the code redundancy and thus it helps in space optimization
4. I have included the comment wherever necessary to make code easy to understand.
77
5.3 Testing Approach Unit Testing

Software testing methodologies are the various strategies or approaches used to test an
application to ensure it behaves and looks as expected. These encompass everything from
front to back-end testing, including unit and system testing.

Unit Testing

TEST ACTUAL SUCCESSFUL REQUIRED


CASE MODIFICATION

ID MODULE EXPECTED OUTPUT OUTPUT (YES/NO)


1 Login 1.System should provide Output is as Yes None
error message if any of the

fields are not filled expected


1.System should provide Output is as Yes None
error message if any of the

fields are not filled expected


3.User should be loggedin Output is as Yes None
successfully if both the id

and password is correct expected

2 Registration 1) When the user directly Output is as Yes None


presses register button
without entering all details, expected
system shall provide error

message.
2) If the user does not Output is as Yes None
provide valid email-id, the
system shall provide error expected
message.
3)If the user fills all details Output is as Yes
properly, the system shall
provide confirmation expected
message to the user and
the data shall be stored in

database.
3 Dish photo Chef should upload the Output is as Yes UI Well
Improved
photo in gallery
uploading expected
4 Dish Update Chef should Deleting the Output is as Yes UI Well
Improved
& Deleting
expected
5 Payment Customer can use Razor Output is as Yes Payment history
Gateway Panel and
pay Gateway to pay Payment
expected
Successful panel
6 Track Order Customer Check or track Output is as Yes Track Dish Panel
UI will Improved
status of dish
expected

Integrated Testing

79
TEST ACTUAL SUCCESSFUL REQUIRED
CASE MODULE EXPECTED OUTPUT OUTPUT (YES/NO) MODIFICATION
ID

1. Home page 1.If User clicks on any tab, Output is as Yes None
user should be directed to expected
the respective page

2. Login Page 1. If user is successfully Output is as Yes None


logged in, then system expected
should redirect the user to
dasboard .If User clicks on
any tab, user should be
directed to the respective
page

3. Navigation 1)If user click any tab in Output is as Yes None


drawer navigation drawer they expected
should be redirect to their
following page

4. Update Page Chef can Update the Food Output is as Yes None
expected

5. Customer Chef can Update Output is as Yes


Profile Page Area, phone no, email, expected
name

6. Customer It can see All the list and Output is as Yes None
Food List expected

System Testing

80
TEST SUCCESSFUL REQUIRED
CASE EXPECTED OUTPUT
ID ACTUAL OUTPUT (YES/NO) MODIFICATIONS

1. User should be able to Output is as Yes None


navigate from one page to expected
another page
2. User should be able to register Output is as Yes None
in the app. expected
3. User should be able to able to Output is as Yes None
see the homepage and expected
Navigation drawer.
4. Chef should be able to dish Output is as Yes None
and image and able to delete expected
dish.
5. System should be available to Output is as Yes None
the user whenever required. expected

81
Chapter No.6
RESULTS AND DISCUSSION

6.1 User Documentation


We performed unit testing, integration testing and the system testing on these modules. For
testing the modules, we had a list of testcases with the expected output. Testing performed
on the modules are according to the testcases described in the previous section. We tested
each module with different set of inputs and recorded the output. The number of test cases
passed to the system were 44 out of which two test cases failed on first attempt. After little
modifications all the testcases gave expected output indicating that the System if Fit-ForUse.
Since testing is done 100% successfully, we can now make use of the system created.

82
OUTPUT OF THE PROJECT

83
84
85
86
87
88
Chapter No.7
CONCLUSIONS

7.1 Conclusion

An online food ordering system is that allows users to order food from. The system includes
several features such as a userfriendly interface, secure payment options, and real-time order
tracking.
Online food ordering systems have become increasingly popular in recent years due to the rise of
the digital age and the convenience they offer. With this system, users can easily browse through
various food items, select their preferred cuisine, and place their orders with just a few clicks.
The Android platform is a suitable choice for developing such a system as it offers a flexible,
open-source framework with a wide range of tools and resources. Developers can leverage
various Android features, such as GPS, push notifications, and in-app messaging to create a
seamless user experience.

Overall, an online food ordering system for VS code is a practical and convenient solution that
benefits both users and restaurants alike. With its efficient ordering and delivery system, it can
help restaurants streamline their operations and improve customer satisfaction, while users can
enjoy the convenience of ordering food from the comfort of their homes.

7.1.1 Significance of the System

The online food ordering system developed as an VS code project has significant importance in
various ways, including:

• Provides convenience to customers in ordering food from anywhere and at any time.
• Saves time for both customers and restaurant staff, making the ordering process
more efficient.
• Improves customer service by providing a real-time tracking feature and organized
order management.
• Increases revenue for restaurants by expanding their customer base and offering
marketing opportunities.
• Enhances the overall efficiency of restaurant operations.

89
7.2 Limitations of the System

An online food ordering system developed as an VS code project has many advantages, but it
also has some limitations that need to be considered. Technical issues, such as server downtime,
connectivity problems, or app crashes, can lead to inconvenience for customers, causing a
decrease in customer satisfaction. Additionally, the system is heavily dependent on technology,
which means that any technical issue could cause delays in orders, leading to a negative impact
on the customer experience.
Delivery challenges are also a potential limitation, such as traffic congestion, poor weather
conditions, or unavailability of delivery personnel, which could cause delays in delivery times
and lead to customer dissatisfaction

7.3 Future Scope of the Project


The future scope of an online food ordering system developed as an VS code project is
promising. Integration of Artificial Intelligence, voice-enabled ordering, blockchain technology,
augmented reality, predictive analytics, gamification, and integration with smart home devices
are potential areas for development and improvement. By incorporating new technologies and
features, the system can continue to enhance the customer experience and improve the efficiency
of restaurant operations.

REFERENCES

90
• https://www.youtube.com/results?search_query=how+can+manage+the+data+base+into+netb
eans

• ://www.w3schools.com/

• https://www.youtube.com/results?search_query=how+can+create+the+data+base+into+vscodes

• https://www.google.com/search?q=image+related+to+food+odering+system&rlz=1C1RXQR_enI
N1019IN1019&oq=image+related+to+food+odering+system&aqs=chrome..69i57j33i10i160l2j3
3i22i29i30.9664j0j4&sourceid=chrome&ie=UTF-8

91
92

You might also like