Food Ordering System in C
Food Ordering System in C
Food Ordering System in C
ABSTRACT
Our proposed system is an online food ordering system that enables ease for the
customers. It overcomes the disadvantages of the traditional queueing system. Our
proposed system is a medium to order online food hassle free from restaurants as well
as mess service. This system improves the method of taking the order from customer.
The online food ordering system sets up a food menu online and customers can easily
place the order as per their wish. Also with a food menu, customers can easily track the
orders. This system also provides a feedback system in which user can rate the food
items. Also, the proposed system can recommend hotels, food, based on the ratings
given by the user, the hotel staff will be informed for the improvements along with the
quality. The payment can be made online or pay-on-delivery system. For more secured
ordering separate accounts are maintained for each user by providing them an ID and a
password.
General Terms Cloud Computing,
Wi-Fi Keywords Automated Food Ordering System, Dynamic Database Management, Internet of
Things, Smart Phone
INTRODUCTION
the online food ordering system sets up a food menu online and customers can
easily place the order as per they like. Also with a food menu, online customers
can easily track the orders. The management maintains customers database, and
improve food delivery service. The Restaurant management systems motivates us
to develop the system. There are various facilities provided so that the users of
the system will get service effectively. Also, the system considers Restaurants as
well as Mess facility to the customers. Again, the idea comes that mostly mess
users are person who are shifted for various reason in new cities. So, they are
interrelated. Increasing use of smart phones is also considered as a motivation, so
that any users of this system get all service on single click. Another motivation can
be considered as the system will be designed to avoid users doing fatal errors,
users can change their own profile, users can track their food items through GPS,
users can provide feedback and recommendations and can give
ratings, it will give appropriate feedbacks to Restaurants / Mess service providers.
Due to lack of a full fledge application that can fulfill the customer requirements
by providing him food from restaurants as well as from mess service, there is a
need for the system. This proposed system will be used by the people who keep
shifting from cities to cites. As well as, it will be useful for the students studying in
different cities. The proposed system will provide the flexibility to the
Customers/Users to order from either Restaurants or Mess. It will also provide
Recommendations to the customers from the restaurants/mess owners uploaded
on a daily basis. In the proposed system, there will be no limitation on the
amount of order the customer wants. Also, same application can be used as a
Startup Business for the developers. It will provide real time customers feedback
and ratings along with the comments to the restaurants/mess owner. It gives
appropriate feedbacks to users, so if there is any error happened, then there will
be a feedback dialog toward users. The proposed system is designed to avoid
users doing fatal errors and inappropriate action. Scope of proposed system is
justifiable because in large amount peoples are shifting to diff erent cities so wide
range of people can make a use of proposed system. The system/interface will
take input from the user. The major attributes that will give input to the dataset
are: name, address, email-Id, mobile no, other personal related values, etc. The
output will include user/customer’s Order, Bill, Feedback and Payment options.
Initially there will be 10 to 12 restaurants and mess services considered inside 2 to
3 areas. The reason why to choose this project is the idea behind project that is to
solve problem of people which they are facing when they shift to different city.
The system is not only for user but also for provider who provides food service.
This system is for making efficient communication between consumer and
producer of the food system which will then leads to the ideal and effective
system.
PROBLEM STATEMENT
The online food ordering system sets up a food menu online and customers can
easily place the order as per they like. Also, the online customers can easily track
their orders. The management maintains customer’s database, and improve food
delivery service. This system also provides a feedback system in which user can
rate the food items. Also, the proposed system can recommend hotels, food,
based on the ratings given by the user, the hotel staff will be informed for the
improvements along with the quality. The payment can be made online or cash or
pay-on-delivery system. For more secured ordering separate accounts are
maintained for each user by providing them an ID and a password
LITERATURE REVIEW I
[1] an automated food ordering system is proposed which will keep track of user
orders smartly. Basically, they implemented a food ordering system for diff erent
type of restaurants in which user will make order or make custom food by one
click only. By means of android application for Tablet PCs this system was
implemented. The front end was developed using JAVA, Android and at the
backend MySQL database was used. In
[2] Customer using a Smartphone is considered as a basic assumption for the
system. When the customer approach to the restaurant, the saved order can be
confirmed by touching the Smartphone. The list of selected preordered items
shall be shown on the kitchen screen, and when confirmed, order slip shall be
printed for further order processing. The solution provides easy and convenient
way to select pre-order transaction form customers. In [3] there was an attempt
to design and implementation of digital dining in restaurants using android
technology. This system was a basic dynamic database utility system which
fetches all information from a centralized database. Efficiency and accuracy of
restaurants as well as human errors were improved by this user-friendly
application. Earlier drawbacks of automated food ordering systems were
overcome by this system and it requires a onetime investment for gadgets. In
[4] an application of integration of hotel management systems by web services
technology is presented. Ordering System Kitchen Order Ticket (KOT), Billing
System, Customer Relationship Management system (CRM) are held together by
the Digital Hotel Management. Add or expand of hotel software system in any size
of hotel chains environment was possible with this solution. In
[5] research work aims to design and develop a wireless food ordering system in
the restaurant. Technical operations of Wireless Ordering System (WOS) including
systems architecture, function, limitations and recommendations were presented
in this system. It was believed that with the increasing use of handheld device
such as PDAs in restaurants, pervasive application will become an important tool
for restaurants to improve the management aspect by minimizing human errors
and by providing higher quality customer service. In
[6] along with customer feedback for a restaurant a design and execution of
wireless food ordering system was carried out. It enables restaurant owners to
setup the system in wireless environment and update menu presentations easily.
Smart phone has been integrated in the customizable wireless food ordering
system with real-time customer feedback implementation to facilitate real-time
communication between restaurant owners and customers.
In Paper
[7], the purpose of this study was to investigate the factors that influence the
attitude of internet users towards online food ordering in Turkey among
university students. A Technology Acceptance Model (TAM) developed by Davis in
1986 was used to study adoption of Web environment for food ordering. Trust,
Innovativeness and External Influences are added to the model as main factors
along with TAM. In Paper
[8], the research work aims to automate the food ordering process in restaurant
and also improve the dining experience of customers. Design implementation of
food ordering system for restaurants were discuss in this paper. This system,
implements wireless data access to servers. The android application on user’s
mobile will have all the menu details. Kitchen and cashier receives the order
details from the customer mobile wirelessly. These order details are updated in
the central database. The restaurant owner can manage the menu modifications
easily. In Paper
[9], this research works on eff orts taken by restaurants owners also to adopt
information and communication technologies such as PDA, wireless LAN, costly
multi-touch screens etc. to enhance dining experience. This paper highlights some
of the limitations of the conventional paper based and PDA-based food ordering
system and proposed the low-cost touch screen based Restaurant Management
System using an android Smartphone or tablet as a solution.
PROPOSED SYSTEM
To overcome the limitations of above system, an Online Food Ordering System
based on Internet of Things is proposed. It is a wireless food ordering system
using android devices. Android devices have gained immense popularity and have
revolutionized the use of mobile technology in the automation of routine task in
wireless environment. Android is a Linux based operating system for mobile
devices such as smartphones and tablets. To develop a reliable, convenient and
accurate Food Ordering System is considered as a general Objective of the study.
To develop a system that will surely satisfied the customer service will be
considered as an objective. One of the Objective is to design a system that is able
to accommodate huge amount of orders at a time and automatically compute the
bill. To evaluate its performance and acceptability in terms of security, user-
friendliness, accuracy and reliability is an important objective. To improve the
communication between the client and customers is one of the objective. The
figure.1 represents the simple system architecture of the proposed system:
for hygienic and quality food, so he/she will search and select restaurant or
home-based food service based on his category and as well as service that is veg
or non-veg. Here the main function is, in what pattern user will search the service
so for that purpose a part of Geo-Hashing Algorithm is used, and GPS system
should be on. Person can have the facility to search service by location that is
home location of the person is detected with GPS and according to selected
option location of nearby service get searched. Another way for searching is by
cost. Here user must give input in terms of rupees that in what range he/she need
service per plate if there are any service provider within that area than the list will
display. User can also search by rating. The service that has rating is checked by
user given rating and if matched it will give the list of service. Search can be done
by accepting distance from user in which user need to search and displaying
service provider within that distance. User can communicate to service provider
with the help of message box and get notification from provider end if any. On
the other end provider has facility to add or reject request from person who want
to join the service.
Coding
// C program to implement the Food
// Ordering System
#include <stdio.h>
#include <string.h>
struct details {
char uname[100];
int age;
char password[100];
char email[100];
char mobile[10];
};
struct hotels {
char hotel[100];
char first_food[20];
char second_food[20];
char third_food[20];
char fourth_food[25];
};
void signup();
// existed or not
void account_check();
// Function to validate
int validate();
void login();
void cart();
void search_by_hotels();
void search_by_food();
// structure dynamically
void hotel_initialize();
char temp_mobile[100];
int main()
while (1) {
printf("\n\n1)SIGNUP\n");
printf("2)LOGIN\n3)EXIT\n\n");
scanf("%d", &choice);
switch (choice) {
case 1: {
signup();
break;
case 2: {
login();
break;
case 3: {
exit(0);
return 0;
default: {
break;
}
}
// system
void signup()
scanf("%s", temp_name);
scanf("%d", &temp_age);
scanf("%s", temp_email);
scanf("%s", temp_password1);
printf("\tConfirm Password:");
scanf("%s", temp_password2);
scanf("%s", temp_mobile);
x = validate();
if (x == 1){
account_check();
login();
}
int validate()
flag = 0;
break;
if (flag == 1) {
count = 0;
count++;
if (!strcmp(temp_password1,
temp_password2)) {
if (strlen(temp_password1) >= 8
&& strlen(temp_password1) <= 12) {
caps = 0;
small = 0;
numbers = 0;
special = 0;
i++) {
caps++;
&& temp_password1[i]
<= 'z')
small++;
&& temp_password1[i]
<= '9')
numbers++;
|| temp_password1[i] == '&'
|| temp_password1[i] == '#'
|| temp_password1[i]
== '*')
special++;
// number
if (strlen(temp_mobile) == 10) {
for (i = 0; i < 10; i++) {
if (temp_mobile[i]
>= '0'
&& temp_mobile[i]
<= '9') {
success = 1;
else {
return 0;
break;
if (success == 1)
return 1;
else {
return 0;
else {
return 0;
else {
printf("\n\nPlease Enter the");
printf("special character\n\n");
return 0;
else {
return 0;
else {
printf("\nPassword Mismatch\n\n");
return 0;
else {
return 0;
void account_check()
{
for (i = 0; i < 100; i++) {
if (!(strcmp(temp_email, s[i].email)
&& strcmp(temp_password1,
s[i].password))) {
main();
break;
if (i == 100) {
strcpy(s[j].uname, temp_name);
s[j].age = temp_age;
strcpy(s[j].password, temp_password1);
strcpy(s[j].email, temp_email);
strcpy(s[j].mobile, temp_mobile);
j++;
void login()
scanf("%s", temp_password1);
if (!strcmp(s[i].email, temp_email)) {
if (!strcmp(s[i].password, temp_password1)) {
printf("3)Exit\n\n");
scanf("%d", &search_choice);
// order by food.
switch (search_choice) {
case 1: {
search_by_hotels();
break;
case 2: {
search_by_food();
break;
}
case 3: {
// exit(1);
main();
return;
default: {
break;
break;
else {
main();
break;
else {
main();
break;
// initializer
void hotel_initialize()
{
// Initializing the structure
strcpy(m[1].hotel, "Aarya_Bhavan");
strcpy(m[1].first_food, "Sandwich");
strcpy(m[1].second_food, "Pizza");
strcpy(m[1].third_food, "Fried_Rice");
strcpy(m[1].fourth_food,"Ice_Cream");
m[1].first = 70;
m[1].second = 100;
m[1].third = 95;
m[1].fourth=50;
strcpy(m[2].hotel, "Banu_Hotel");
strcpy(m[2].first_food, "Parotta");
strcpy(m[2].second_food, "Noodles");
strcpy(m[2].third_food, "Chicken_Rice");
strcpy(m[2].fourth_food,"Dosa");
m[2].first = 15;
m[2].second = 75;
m[2].third = 80;
m[2].fourth=50;
strcpy(m[3].hotel, "SR_Bhavan");
strcpy(m[3].first_food, "Chicken_Biriyani");
strcpy(m[3].second_food, "Prawn");
strcpy(m[3].third_food, "Faloda");
strcpy(m[3].fourth_food,"burger");
m[3].first = 90;
m[3].second = 120;
m[3].third = 35;
m[4].fourth=50;
// by hotels
void search_by_hotels()
hotel_initialize();
printf(""
m[1].hotel,
m[2].hotel, m[3].hotel);
scanf("%d", &hotel_choice);
if (hotel_choice > 4) {
printf("valid choice\n\n");
search_by_hotels();
else if (hotel_choice == 4)
// exit(1);
return;
else
hotels(hotel_choice);
}
total = 0;
while (1) {
// foods available in
// selected hotel
m[hotel_choice].hotel,
m[hotel_choice].first_food,
m[hotel_choice].first);
m[hotel_choice].second_food,
m[hotel_choice].second,
m[hotel_choice].third_food,
m[hotel_choice].third);
printf("Your Choice\t");
scanf("%d", &food_choice);
// of foods to calculate
if (food_choice == 1) {
m[hotel_choice].first_food);
scanf("%d", &n);
total = total
+ (n * m[hotel_choice].first);
else if (food_choice == 2) {
printf("of %s\t",
m[hotel_choice].second_food);
scanf("%d", &n);
total = total
+ (n * m[hotel_choice].second);
else if (food_choice == 3) {
printf("of %s\t",
m[hotel_choice].third_food);
scanf("%d", &n);
total = total
+ (n * m[hotel_choice].third);
// by giving choice as 4.
else if (food_choice == 4) {
cart();
else if (food_choice == 5) {
search_by_hotels();
}
else {
printf("valid Choice\n\n");
void search_by_food()
total = 0;
hotel_initialize();
while (1) {
m[1].first_food, m[1].first,
m[1].second_food, m[1].second);
m[1].third_food, m[1].third,
m[2].first_food, m[2].first);
m[2].second_food, m[2].second,
m[2].third_food, m[2].third);
m[3].first_food, m[3].first,
m[3].second_food, m[3].second);
m[3].third);
printf("11) Exit");
scanf("%d", &food);
printf("valid choice\n\n");
search_by_food();
// functionality
cart();
// exit(1);
return;
else
food_order(food);
// order functionality
hotel_id = 1;
else if (food >= 4 && food <= 6)
hotel_id = 2;
else
hotel_id = 3;
if ((food % 3) == 1) {
m[hotel_id].first_food);
scanf("%d", &n);
else if ((food % 3) == 2) {
printf("Count of %s\t",
m[hotel_id].second_food);
scanf("%d", &n);
else if ((food % 3) == 0) {
printf("Count of %s\t",
m[hotel_id].third_food);
scanf("%d", &n);
void cart()
printf("\n\n\n\n*************Cart***************");
scanf("%d", &ch);
if (ch == 1) {
// exit(1);
return;
else if (ch == 0) {
scanf("%d", &confirm);
if (confirm == 1) {
printf("cancelled!! Exiting..");
// exit(1);
return;
else {
printf("\n\nThank You\n\n");
login();
else {
printf("correct choice\n\n");
cart();
}
}
Output:
RESULTS
The result of our system application includes an Android Application as well as a
Web-based application. Once a customer place an order for a restaurant / mess,
he/she will get the order Id on the screen dynamically. The customer can check
the status of the order through the Order Status interface provided in the GUI of
the application. We have developed the system application in such a way that the
customer can order the food first and then enter the required credentials while
checkout. Once the order is delivered to the customer, a feedback mail is send to
the customer regarding his experience with the entire application. The feedback
mail consists of the star rating as well as comments of the customer. The
customer can track his order through the Tracking Interface provided in the GUI
of the application. The restaurant / mess owner as well as customer can track the
order in our system application. The preview of this tracking system is shown
below:
HARDWARE REQUIREMENTS
SOFTWARE REQUIREMENTS
[1]. Kirti Bhandge, Tejas Shinde, Dheeraj Ingale, Neeraj Solanki, Reshma Totare,dzA
Proposed System for Touchpad Based Food Ordering System Using Android
Applicationdz, International Journal of Advanced Research in Computer Science
Technology (IJARCST 2015). [2]. Varsha Chavan, Priya Jadhav,Snehal Korade,Priyanka
Teli, dzImplementing Customizable Online Food Ordering System Using Web Based
Applicationdz, International Journal of Innovative Science, Engineering
Technology(IJISET) 2015. [3]. Resham Shinde, Priyanka Thakare, Neha Dhomne,
Sushmita Sarkar, dzDesign and Implementation of Digital dining in Restaurants using
Androiddz, International Journal