Uploaded by Kavita Gautam

Final Year Project Documentaion

advertisement
QMENU-AN ANDROID APPLICATION FOR
DIGITALIZING RESTAURANT MENU AND
RECOMMENDING RESTAURANT NEARBY
Tribhuvan University
Institute of Science and Technology
A Final Year Project Report Submission in
Partial Fulfilment of the Requirement for the Degree of
Bachelor of Science in Computer Science and Information Technology
UNDER THE SUPERVISION OF
ABHISHEK DEWAN
ASSISTANT PROGRAM CO-ORDINATOR
SUBMITTED BY
ANISH REGMI (8102/072)
KAVITA GAUTAM (8111/072)
KOSHISH ARYAL (8113/072)
SURAJ LOHANI (8138/072)
SUBMITTED TO
TRINITY INTERNATIONAL COLLEGE
Department of Computer Science and Information Technology
Dillibazar Height, Kathmandu, Nepal
June, 2019
QMENU-AN ANDROID APPLICATION FOR
DIGITALIZING RESTAURANT MENU AND
RECOMMENDING RESTAURANT NEARBY
Tribhuvan University
Institute of Science and Technology
A Final Year Project Report Submission in
Partial Fulfillment of the Requirement for the Degree of
Bachelor of Science in Computer Science and Information Technology
SUBMITTED BY
ANISH REGMI (8102/072)
KAVITA GAUTAM (8111/072)
KOSHISH ARYAL (8113/072)
SURAJ LOHANI (8138/072)
SUBMITTED TO
TRINITY INTERNATIONAL COLLEGE
Department of Computer Science and Information Technology
Dillibazar Height, Kathmandu, Nepal
June, 2019
DECLARATION
Project entitled “QMENU-AN ANDROID APPLICATION FOR DIGITALIZING
RESTAURANT MENU AND RECOMMENDING RESTAURANTS NEARBY” which is
being submitted to the Department of Computer Science and Information Technology,
Dillibazar, Kathmandu, Nepal for the fulfilment of the Seventh semester under the supervision
of Mr. Abhishek Dewan. This project is original and has not been submitted earlier in part or
full in this or any other form to any university or institute, here or elsewhere, for the award of
any degree.
Signature By:
Anish Regmi (8102/072)
Kavita Gautam (8111/072)
Koshish Aryal (8113/072)
Suraj Lohani (8138/072)
iii
RECOMMENDATION
This is to recommend that ANISH REGMI, KAVITA GAUTAM, KOSHISH ARYAL and
SURAJ LOHANI has carried out research entitled “QMENU-AN ANDROID
APPLICATION
FOR
DIGITALIZING
RESTAURANT
MENU
AND
RECOMMENDING RESTAURANTS NEARBY” for the fulfilment of seventh semester in
B.Sc. in Computer Science and Information Technology under my supervision. To our
knowledge, this work has not been submitted for any other degree.
They have fulfilled all the requirements laid down by the Trinity International College
Department of Computer Science and Information Technology, Dillibazar, Kathmandu.
Mr. Abhishek Dewan
Assistant Program Coordinator
Department of Computer Science and Information Technology
Trinity International College
Dillibazar, Kathmandu, Nepal
iv
LETTER OF APPROVAL
Date: 06/07/2019
On the recommendation of Mr. Abhiskek Dewan, this Project Report submitted by Anish
Regmi, Kavita Gautam, Koshish Aryal and Suraj Lohani entitled “QMENU-AN
ANDROID APPLICATION FOR DIGITALIZING RESTAURANT MENU AND
RECOMMENDING RESTAURANTS NEARBY” in partial fulfillment of the requirement
for the award of bachelor’s degree in Computer Science and Information Technology is a bona
fide record of work carried out under my/our guidance and supervision at Trinity International
College, Dillibazar, Kathmandu.
EVALUATION COMMITTEE
…………………………….
……………………………
Mr. Satya Bahadur Maharjan
Mr. Abhishek Dewan
Program Coordinator,
Assistant Coordinator
Department of Computer Science and
Trinity International College
Information Technology,
Supervisor
Trinity International College
Dillibazar, Kathmandu, Nepal
………………………….
External
Date:
v
ACKNOWLEDGEMENT
The success of this project is the result of the guidance and support from many valuable people.
First of all, we would like to thank our Mr. Satya Bahadur Maharjan – Head of Department
of Computer Science and Technology, Trinity International College for providing us with the
environment which enabled us to make our project a success.
With immense pleasure, we express deepest sense of gratitude and sincere thanks to our highly
respected and esteemed guide Mr. Abhishek Dewan, our supervisor for his confidence
bestowed on us and for entrusting our project through his valuable guidance. We would like to
express our innermost thanks to him for providing us with all the crucial advices, guidelines
and resources for the accomplishment of this project.
We would also like to thank Mr. Jitesh Tuladhar for his invaluable help for the technical
aspects of this project. Due to his proper maintenance of the labs and network, we were able to
get valuable technical and logistical support for the project.
We are also grateful to the entire Computer Science Department of Trinity International
College for housing us a seemly environment where we could work with this project. We were
pleased to be under the commands of the department to help us form all possible ways.
Anish Regmi (8102/072)
Kavita Gautam (8111/072)
Koshish Aryal (8113/072)
Suraj Lohani (8138/072)
vi
ABSTRACT
The ritual of walking into a restaurant, finding the items from menu and giving our orders to
the waiter is already conventional. While walking into a restaurant today, there’s high chance
we’ll be presented book of menu. These things should be upgraded slowly and the way of
interaction of customers and restaurants should fundamentally change. Menu digitization offers
significant benefits to the restaurant, the restaurant staff, the customers who get to see the most
recent menu information, latest pricing and other descriptions in a shorter span of time. The
project entitled, “QMENU-AN ANDROID APPLICATION FOR DIGITALIZING
RESTAURANT MENU AND RECOMMENDING RESTAURANTS NEARBY”
provides the digitalized menu and gives a precise recommendation of restaurants nearby
according to the user preference, location and budget estimations. The electronic view of menu
is accessed after scanning of QR code by using a smartphone equipped with QR code scanner.
Furthermore, nearby restaurants are recommended for further options that satisfies the
customer considering the price, desired cuisines, target and location.
The proposed system is based on k-NN algorithm that chooses the nearest available options
based on different factors of its dataset.
KEYWORDS: Menu Digitization, Recommendation, QR code scanner, k-NN algorithm
vii
TABLE OF CONTENTS
DECLARATIONiii
RECOMMENDATIONiv
LETTER OF APPROVALv
ACKNOWLEDGEMENTvi
ABSTRACTvii
LIST OF ACRONYMS ANDABBREVIATIONSxi
LIST OF FIGURESxii
CHAPTER 11
INTRODUCTION1
1.1
Introduction1
1.2
Problem Definition2
1.3
Objectives3
1.4
Scope of the project3
1.5
Limitations3
CHAPTER 24
RESEARCH METHODOLOGY4
2.1
Literature Review4
2.2
Related Study5
2.2.1
iMENU6
2.2.2
Hottab biz6
2.2.3
Zomato6
2.3
Methodology6
2.3.1
QR code scanner6
2.3.2
Recommendation system7
2.3.3
Implementation of k-NN algorithm7
2.3.4
Haversine Formula7
viii
2.3.5
Filters8
CHAPTER 39
SYSTEM DEVELOPMENT9
3.1
System Architecture9
3.2
Software Requirement Specification9
3.2.1
Functional Requirement9
3..2.1.1 Use Case Diagram10
3.2.2
3.3
Non-functional Requirement10
Feasibility study10
3.3.1
Technical Feasibility11
3.3.2
Economic Feasibility11
3.3.3
Operational Feasibility11
3.3.4
Schedule Feasibility11
3.4
System Design12
3.4.1
Sequence Diagram12
3.4.2
System Flowchart13
3.4.3
Data Flow Diagram14
CHAPTER 417
IMPLEMENTATION AND TESTING17
4.1
Resource Requirement17
4.1.1
Android Phone17
4.1.2
Android studio17
4.1.3
Firebase realtime database17
4.1.4
Internet Connection17
4.2
Unit Testing17
CHAPTER 519
CONCLUSION AND RECOMMENDATION19
ix
REFERENCES20
APPENDIX-I21
APPENDIX-II22
x
LIST OF ACRONYMS
CS
Computer Science
DFD
Data Flow Diagram
k-NN
k-Nearest Neighbour
QR
Quick Response
xi
LIST OF FIGURES
Figure 1: System Architecture9
Figure 2: Use Case Diagram10
Figure 3: Gantt chart12
Figure 4: Sequence Diagram12
Figure 5: Class Diagram13
Figure 6 : System Flowchart14
Figure 7: Context Diagram15
Figure 8 : Level 1-DFD15
Figure 9: First Display Screen21
Figure 10: Camera Opens After Clicking21
Figure 11: Digitalized Menu After Scanning QR Code21
Figure 12: Recommending Nearest Restaurant21
Figure 13: Filter Options For Precise Recommendation21
Figure 14: Result After Filtered Recommendation21
xii
CHAPTER 1
INTRODUCTION
1.1
Introduction
The pace of change in technology has been increased in the current context and it does not
seem to be stopping. To cope up with this change every sector needs to digitize as much as
possible. There are few sectors which are lagging behind to do so and figuring out those part
and emerging with a new idea on such sectors is necessary. And one of the sectors can be
considered as the food sector.
Food delivery systems are emerging but the advancement in the location itself is very low. The
working here in restaurants are not still digitalized. The digitalization of the restaurant menu
for which a user doesn’t need to get inside the restaurant just to know the availability of the
product and its price. The location of any entity can be easily known these days. After knowing
the price and availability of the product, a nearby restaurant can be suggested to the user in
order to give them an option.
Digital restaurant menu offers the opportunity of presenting dish in an elaborate manner.
Customers will develop a crystal-clear idea about your special delicacies along with the
ingredients and preparation time. They will also have the golden chance to add their preferences
such as what kind of flavours, spicy or non-spicy, etc. It offers the gift of easy navigation.
Customers no longer need to breeze through the entire menu. All they have to do is choose the
desired category and select their delicacy. With the digital menu app, With the digital menu
app, food ordering has become a single-click affair. Customers will not have to wait for long
periods, and can easily place their orders directly. Digital menus can be updated frequently in
creative and fun ways. They can be updated to include new deals, combos, offers, or tweaks in
pricing that could be delayed in print because of the cost or other factors. For larger restaurant
chains, the benefit of restaurant menu digitization is even greater due to the volume of menus
in circulation.
It is often perplexing for a person to decide which restaurant he must visit from a huge range
of available options. There have been numerous suggestion frameworks accessible for issues
like shopping, online video excitement, recreations, and so forth. By developing a
recommendation system which could help a user to decide which restaurant one should visit,
the person can save a lot of his time, efforts and money and thus have a great experience and
satisfaction. There are various factors based on which a user makes a decision of visiting a
1
restaurant like the type of cuisine of the restaurant, the location of the restaurant, restaurant
reviews, price range which aims to build an efficient recommendation system for the users in
the form of a android application and thus help them predict whether they will like visiting a
restaurant by applying different algorithms.
As modern consumers, we greatly benefit from restaurant recommendation applications. It is
so convenient to get a list of restaurants that match our preferences without much clicking,
comparing, and browsing for each single business. It is very common that people hang out with
families, friends, and co-workers when comes to lunch or dinner time. As the users of
recommendation applications, people care more about how we will like a restaurant. People
will tend to have happier experiences when the prediction of the recommendation system is as
good as what it says.
In this project, K-nn algorithm is applied using Euclidean distance formula and the next is
haversine formula for distance calculation. Here, K-nn algorithm works based on minimum
distance from the query instance to the training samples to determine the K-nearest neighbours
where 'K' in K-Means is the number of clusters the algorithm is trying to identify/learn from
the data and haversine formula is used to calculate the distance between two points (i.e. latitude
and longitude of a restaurant along with the latitude and longitude of another restaurant which
uses another place of the map).Different parameters as restaurant types, pricing are used and
Euclidean distance is calculated between the expected and actual data and then clustering of
restaurants including restaurant details is done whereas haversine formula is used to calculate
the distance of geo co-ordinates that is latitude and longitude between the two restaurants. After
then, top few restaurants are recommended using filters from previously displayed restaurants.
1.2
Problem Definition
Food is one of the basic human need now, but with a change in the society people these days
are more into eating healthy, sophisticated yet quickly, restaurants are often the best option for
it today. The changes with increasing restaurant numbers are making users find a restaurant
more complicated which is the best fit for them. The first thing comes to a person’s mind before
finding a restaurant is what does the restaurant offer, it is now only possible after the user enters
the restaurant and asks for the menu provided by the service provider. There is a tradition of
visiting the restaurant, waiting for the menu, and selecting the dishes and only making the
budget estimation there which may not satisfy the customer as they have to wait a long time
just to view the menu and have the dishes they prefer.
2
Therefore, the main goal of this mobile application is to make user know what items are offered
by the restaurant using our app and without going into the restaurant. By using this app
restaurants can go menu less and the items can be updated on a regular basis based on the
season for the food item. This app can be implemented in a restaurant resulting in a menu less
restaurant which reduces the human effort for providing the menu in the restaurant.
1.3
Objectives
The main goal of the system is to provide an electronic view of a menu and further to provide
a precise recommendation of a restaurant for the individual according to their preference,
location and other preferences. It also aims to serve some objectives that target the following
purposes:
i.
To access the digitalized menu through links by using a smartphone equipped with a
QR code scanner and update the menu whenever required
ii.
To find the right restaurants according to budget, target and location with better
management
iii.
1.4
To update menu according to the seasonal change and types of customer flow.
Scope of the project
The system will allow users view a restaurant’s menu before physically being inside the
restaurant. If the restaurant doesn’t offer the items user want or the restaurant is not feasible to
the user due to any reason nearby restaurants is recommended by the system that users can visit
to. Users can filter restaurants according to their needs in by choosing the filters provided in
the application. Since the menus are provided into user’s handset, human effort is reduced and
it is less time consuming as well.
1.5
Limitations
Although the system digitizes the restaurant menu and recommend a restaurant, it is the
minimal version of what it can be done. The system cannot be used unless a QR code with
unique restaurant ID is provided, the restaurant’s owners are not given access to the system
therefore they cannot update menus on their own.
3
CHAPTER 2
RESEARCH METHODOLOGY
2.1
Literature Review
CS229 Project - Best Buy Recommendation System
This project works on developing a simple recommender system based on search query and
clicks data. In particular, it is focusing on recommending Xbox games based on a given query.
This project originated as a Kaggle competition and is closed right now. It implements different
techniques for building recommendation systems to this problem and compare how they
perform and observe their strengths and weaknesses. For recommender engines, collaborative
filtering is used to identify different users which are similar to a particular user. [4]
Recommendation System Based on Clustering and Collaborative Filtering
The recommendation of the item’s cluster to the user instead of specific items is the best as the
user-based recommendation. For the partition of the cluster, the pre-processing phase is
conducted. Now, these clustered produces the recommendation to this pre-processed cluster.
As almost everything is precomputed it's generally faster in runtime. A Recommendation
Engine by Conjoint Decomposition of items and Users (RECONDITUS)-a technique that is an
extension of preference-based recommender systems to recommend items from a new disjoint
set to users from a new disjoint set is introduced. [2]
Design and Implementation of a movie Recommendation system using KNN
Algorithm:
Using the user based collaborating filtering mechanism, this system tries to know the
preferences of the user by collecting and analysing the historical behaviour to know the
preferences of the user by collecting and analysing the historical behaviour to know what kind
of person is, what kind of behaviour he has, his preferences. Each a recommendation has a
different range and uses condition, it results in the use of different recommendation algorithm
for same information recommendation. Once it determines the neighbours, calculating its score
of the user the recommendation is done. In the case of a new user, based on their registration
information. [1]
QR Code Recognition from Image
The recognition of QR code that was defines by computer or made by the computer its selfusing some encryption or decryption algorithm. The particular domain is the information is
encrypted or decrypts information it describes particular information in secret code that
contains authentication. QR code is the type of matrix barcode. The QR Code system has
4
become admired outside the automotive industry due to its fast readability and greater storage
capacity compared to standard UPC barcodes. With the technology of mobile phones
constantly emerging, especially in the area of mobile internet access, QR codes seem to be an
adequate tool to quickly and efficiently converse URLs to users. This also allows offline media
such as magazines, newspapers, business cards, public transport vehicles, signs, t-shirts and
any other medium that can embrace the print of a QR code to be used as carriers for
advertisements for online products. QR code is so versatile because of its structural flexibility
that it leads to so many diverse fields for research such as increasing data capacity, security
applications such as different kinds of watermarking and steganography as well. Some
experiments have also been done for better recognition of the QR code image that includes
scratch removal techniques. The paper is an attempt to highlight some of the possible research
areas while considering QR codes. [6]
Geolocation Based Recommender System:
The proposed system in this project is a recommendation software which is based on the
concept of machine learning that recommends users by reading the current location of the user,
interacting with the database, and provides results based on the calculations. The algorithm
takes into account three different parameters to obtain the result i.e. home location, current
location, profile and interest list. Recommendations will be based on these parameters, either
explicitly given by user or extracted from database by the system, and an affinity score will be
calculated that will judge user's relative likeness to a certain object. The system uses Content
–based filtering that is based on a description of the item and a profile of the user’s preference
and Collaborative filtering that is based on collecting and analysing a large amount of
information on user’s behaviours, activities or preferences and predicting what users will like
based on their similarity to other users. The algorithm used in the project uses Haversine
formula to calculate the distance between user and other people in the vicinity and calculates a
score based on the distance calculated. It is capable of recognizing various people and activities
related to user’s interests. The job profile and organization is also taken into account to obtain
the final result. The software recommends people with similar interests with their location to
the user. [7]
2.2
Related Study
After going through a number of papers, implementation and reviewing different papers and
articles we have concluded that though there are many systems providing the services like a
5
recommendation, QR-code menu scanner and so on. The proposed system not only scans and
displays the menu but also helps to recommend the nearby restaurant using the location of the
restaurant. The QR-code scanner is opened once the application is chosen the QR code is
scanned, the Id of the restaurant is matched now the menu of the restaurant is displayed. If the
user is happy with the menu the recommendation isn’t necessary but if not, the nearby
restaurant is given as an option.
There are several different applications that are similar to this system and some of them are
primary means of research for this system.
2.2.1
iMENU
iMENU is an android application developed by iNCUBITU TECH that scans QR code and
displays digitalized menu and provides order to the restaurant. This application is used as
reference for our system.
2.2.2
Hottab biz
Hottab biz is one of the leading food applications in Vietnam which provides users menu where
any users or established business can upload menu from home or the restaurants, the buyers
starts receiving orders from other users gradually. This application helps keep track of every
sales and access daily sales. This application manages delivery fulfilment and triggers SMS
updates, views maps in order to obtain maps for delivery address & routes. This application is
also taken as one of the references in our system.
2.2.3
Zomato
Zomato is the restaurant finder and food delivery app based in India which helps users search
and discover restaurant and eat out at or order it from the restaurant. Users can browse through
restaurant menus, photos, user review and ratings get recommendations according to their
preferences. Zomato helps map the restaurant. Users can review visited restaurants that helps
other users for future recommendation.
2.3
2.3.1
Methodology
QR code scanner
QR code is an image that consists a data encrypted in it. Those data are scanned and decrypted
by QR code scanners. Those codes consist of unique ID in the system that are sent to the
database and data from the database is abstracted and shown in the display screen. For scanning
the code, Zxing api is used in our system which is developed by Zxing team. This api is used
because this api is precisely accurate and developed using Java programming.
6
2.3.2
Recommendation system
From, the information researched and gathered k-NN algorithm implementation seems to be
the appropriate technique for our use case. Recommendation based on nearest available
neighbour can make users get nearest possible restaurant. So, it is decided to use k-NN
algorithm to serve better.
2.3.3
Implementation of k-NN algorithm
i. Load the data Initialize the value of k
ii. For getting the predicted class, iterate from 1 to total number of locations
a. Calculate the distance between test data and each row of training data. Here we will
use Euclidean distance as our distance metric other metric like cosine can be still
used, etc.
b. Sort the calculated distances in ascending order based on distance values
c. Get top k rows from the sorted array
d. Get the most frequent class of these rows
e. Return the predicted class
2.3.4
Haversine Formula
The Haversine formula determines the great circle distance between two points on a spare
given their longitude and latitude. The formula in the project is used to calculate the distance
between the two points. (i.e. Customer taken restaurant value and nearby restaurant value).
The haversine formula remains particularly well-conditioned for numerical computation for
even at small distance - unlike calculations based on the spherical law of cosine.
Mathematical formula
a = sin²(Δφ/2) + cos φ1 ⋅ cos φ2 ⋅ sin²(Δλ/2)
c = 2 ⋅ atan2( √a, √(1−a) )
d=R⋅c
where
φ is latitude, λ is longitude, R is earth’s radius (mean radius = 6,371km);
Implementation:
The formula in our project is used to calculate the distance between two points (i.e. latitude
and longitude of a restaurants along with the latitude and longitude of another restaurant
which uses another place of the map).
Pseudocode
7
function[a,c,dlat,dlon]=haversine(lat1lon1,lat2,lon2)
earthradiusKM=dlat(radian(lat2-lat1))
dlon(radian(lon2-lon1))
a=(sin(dlat/2)^2+cos(lat1)*cos(lat2)*(sin(dlon/2))^2
c=2*atan2(sqrt(a),sqrt(1-a));
Return earthradius KM*c;
End;
2.3.5
Filters
There are multiple factors that can be used as filters so that the user get the required
preferences efficiently. Factors like price range of the restaurant , music availability in the
restaurant and type of the restaurant. The price range is divided into three categories based on
high considered as 3, medium considered as 2 and low considered as 1. The availability of the
restaurant is considered as yes and no based on their availability. The type of restaurant is
divided as family, casual, fast food, fast casual. In this way using these three factors k-nn
algorithm is used
8
CHAPTER 3
SYSTEM DEVELOPMENT
3.1
System Architecture
The system working and its components can be shown as figure below where the generated
QR code is scanned through QR code Scanner and opens the system (Android app). After then
their occurs opening of digitalized menu which consists of restaurants name, location, menu
items, types and descriptions. And for the further options, recommending of nearby restaurants
occurs for further user choices according to their budget estimation.
Figure 1: System Architecture
There is a QR code provided which contains the ID for the restaurant whose menu is to be
provided. Once the ID is recognized by the system, it is sent to database from which the data
is retrieved and the menu is displayed. Those data are viewed by the users and if the menu is
not satisfiable then recommendation option is chosen in which system provides available
nearby restaurants. After then, further options for filters is given for further precise
recommendation.
3.2
Software Requirement Specification
Developing an application for Android includes many requirements. The basic software
requirements include Java Development Kit (JDK) and Android SDK including Gradle which
is an advanced build toolkit. The hardware requirements include at least 2 GB RAM and 2 GB
Hard-Disk space. Although RAM is upgraded to 8 GB for smooth work and environment.
3.2.1

Functional Requirement
The system must be able to scan the QR code with unique restaurant ID.
9

The system must be able to track the current location of the user.

It must provide nearest neighbor search results depending on the user’s location data.

It must provide the results in short period of time.
3..2.1.1
Use Case Diagram
A use case diagram is a graphic depiction of the interactions among the elements of a system.
A use case is a methodology used in system analysis to identify, clarify, and organize system
requirements
Figure 2: Use Case Diagram
In Figure 2 the ‘use case diagram of the digitalized menu’. Here the application is accessed
by the user with the help of QR code scanner generated previously for restaurant and retrieve
its menu. If the user is okay with the menu then user visits the restaurant else some other
restaurants are recommended.
3.2.2
3.3
Non-functional Requirement

The system must provide an easy to use interface.

It should be compatible in android platforms with version 4.4
Feasibility study
Every project is feasible provided given unlimited resources and infinite time. It is both
necessary to evaluate the feasibility of a project at earliest possible time. Wastage of manpower
and financial resources can be avoided if an ill-conceived system is recognized early in the
development stage. So, a detailed study was carried out to check the workability of the
10
proposed system. To check whether our project is feasible or not there are several things to be
checked such as economy, technology, operational, financial status etc.
3.3.1
Technical Feasibility
This system is technically feasible with the requirements which includes Android platform that
should be of Android 4.4 nicknamed KitKat,10th major version of Android, camera and QR
code scanner. The user smart phone is equipped with the QR code scanner that scans the QR
code generated after pointing it steady for 2-3 seconds towards the QR Code. Whenever
scanning is enabled, a notification will appear. The user’s smartphone should be access to
internet through cellular network or regular Wi-Fi as we are using online database, firebase.
3.3.2
Economic Feasibility
The economic feasibility deals with all the expenditures required for the research and
development of the project such as hardware and software cost, resource cost, employee cost
etc. No natural cost was used during the development of our project and this was achieved
because most of the technologies used are freely available.
3.3.3
Operational Feasibility
It deals with the consideration about working of our system after installation. The proposed
system would be very beneficial to the customers as it simplifies them in various ways by
providing the restaurant menu in users handset that reduces human effort and is less time
consuming. The system is well functioned after the scanning of QR code provided with the
unique ID of a particular restaurant.
3.3.4
Schedule Feasibility
The timetable of this project is reasonable. The development of the android application, QR
code generator, QR code scanner and the testing are all completed at the scheduled time. So,
this project is feasible in scheduling. Gantt chart is drawn below for the project scheduling:
11
Figure 3: Gantt chart
3.4
System Design
3.4.1
Sequence Diagram
A sequence diagram simply depicts interaction between objects in a sequential order i.e. the
order in which these interactions take place and describes how and in what order the objects in
a system function. The terms event diagrams or event scenarios are used to refer to a sequence
diagram.
Figure 4: Sequence Diagram
In Figure 4, application user acts as an actor who primarily access the app and scans the QR
code through QR code Scanner. After then, the android app (Q menu) is opened that shows the
menu display which consists of restaurant names, list of menu items, price and its types and
descriptions. The user then views those menus and make choices. For their further options,
nearby restaurants are recommended and are shown in restaurants display that consists of list
12
of recommended restaurants and its certain filters. The user then views the display and make
choices.
3.4.2
Class Diagram
Figure 5: Class Diagram
3.4.3
System Flowchart
System Flowchart is the graphical representation of the flow of the program and represents the
work progress of the system. The main propose of the below flowchart is to represent the flow
of the information between the entity and the system.
13
Figure 6 : System Flowchart
In Figure 6, the system flowchart is shown which shows the complete working mechanism of
the system. Initially, the android device opens the application, scans the QR code which after
verification displays the menu. If the displayed menu doesn’t meet user’s requirement similar
restaurants can be are recommended and displayed in the device.
3.4.4
Data Flow Diagram
The processing of the system and its working is shown in the show on data flow diagram which
shows the that when a QR code is scanned in by the system a menu is displayed and the nearby
restaurant are displayed if necessary.
14
Figure 7: Context Diagram
Figure 7 shows context diagram for the system; it is the level 0 diagram that shows basic
description of the system.
Figure 8 : Level 1-DFD
15
Figure 8 is the Level-1 DFD of the system in which figure shows how digitalized menu is
displayed scanning QR code and other restaurants are recommended.
16
CHAPTER 4
IMPLEMENTATION AND TESTING
4.1
4.1.1
Resource Requirement
Android Phone
This system is compatible with android phone with android version 4.4 KitKat. It takes camera
permission which is used to read QR code.
4.1.2
Android studio
Android studio is used in order to build and run java codes and run them into the devices.
4.1.3
Firebase real time database
Firebase is a development platform used in mobile and web application development platform
which uses concept of no SQL database in which data are stored in JSON format. It is an online
database which offers automatic offline support and is synchronised in real time with every
connected client.
4.1.4
Internet Connection
This system has data stored in firebase database which is a real time online database,
therefore internet connection is required in order to obtain data from the database and display
it.
We perform unit testing on the system to explore its functionality and working to identify errors
and possible problems.
4.2
Unit Testing
Unit testing was performed on individual class. Each individual unit in the system were
thoroughly checked and validated. The purpose of unit testing was to ensure the working of
each module properly without any errors. We emphasized on setting up the test data for a piece
of code that can be tested first and then implemented.
Tabular representation of Unit testing
Opening the application
Objective
Scan the QR Code
Expected Output
Scan the QR code properly
Error
Unable to show the result if QR code isn’t seen
properly else work fine
Retrieving the data
17
Objective
To retrieve the data from database
Expected Output
Get the data from the database
Error
Small error in data format result to crash of
app
Applying a filter
Objective
Applying a filter
Expected output
To apply the filter based on user choice
Error
-
Integration Testing
Objective
Check the integration testing
Expected Output
Scanning: QR code scanned successfully
Retrieving: Data successfully retrieved
from database
Recommendation: Based on scanned
restaurant nearest restaurant available is
recommended
Error info
Application run successfully
18
CHAPTER 5
CONCLUSION AND RECOMMENDATION
The output we obtained was a digitalized menu on the screen after the given QR code was
scanned, once the id was matched with the restaurant available on the database. From the data
available on the database the location data available was taken and calculated with all other
restaurant’s location available throughout the database. The location with nearest location was
taken and recommended in the next screen. After the restaurant was recommended the users
are able to view the details of all the recommended restaurants. Furthermore, if the user is not
satisfied by the result, user can use filter options for precise recommendation according to
user’s preferences of the restaurant. With this system users can efficiently view the restaurant
of their own preference.
In the system, once user scans the QR code they can view the digitized menu and other
components of the restaurant, the user can now view the nearest restaurant from the options
available. Among the 5 nearest restaurant, the recommendation can be made more précised by
filtering them with the available options.
5.1
Future Scope
The project can be further extended to next level by adding features like ordering the product
of the restaurant from the app with the order item option in the app itself. The payment
module can also be added in the app so that the user don’t need to keep cash in their pocket
they could just pay by the app.
19
REFERENCES
[1]
Bei-Bei CUI “Design and Implementation of Movie Recommendation System Based
on KNN Collaborative Filtering Algorithm
[2]
K. Dhanalakshmi, A. Anitha, G. Michael, K.G.S. Venkatesan “Recommendation
System Based On Clustering and Collaborative Filtering”
[3]
Machine Learning, Tom M. Mitchell. McGraw-Hill Science/Engineering/Math;
(March 1, 1997) page [231-238]
[4]
Nikhil Rajendra, Anubhav Dewan, Mehmet Can Colakoglu “CS229 Project - Best Buy
Recommendation System”
[5]
Priyanka V. Narkhede,Radhika V. Mahalle ,Priya A. Lokhande,Reetu M.
Mundane,Dhiraj M. Londe “Bus Tracking System Based on Location-Aware Services”
International Journal of Emerging Technologies in Engineering Research (IJETER)
Volume 6, Issue 3, March (2018)
[6]
QR Code Recognition from Image Abhishek Mehta Shrimad Rajchandra Institute of
Management and Computer Application, Uka Tarsadia University, Gujarat, India.
[7]
Yogesh Sharma, Deepika Bhagwani, Hemant Pandey, Neha Gupta Computer Science
Department, Maharaja Agrasen Institute of Technology, Rohini, New Delhi, India
Geolocation Based Recommender System. Volume 6, Issue 4, April 2016.
20
APPENDIX-I
Figure 9: First Display Screen
Figure 10: Camera Opens After
Figure 11: Digitalized Menu
Clicking
After Scanning QR Code
Figure 12: Recommending
Figure 13: Filter Options For
Figure 14: Result After Filtered
Nearest Restaurant
Precise Recommendation
Recommendation
21
APPENDIX-II
For calculating distance between two restaurants
Distance Calculator:
package com.project.restaurantapp.Adapters;
public class DistanceCalculator {
/**
* lat1- latitude 1
* lat2 — latitude 2
* lon3 — longitude 1
* lon4 — longitude 2
*/
public static Double
lat2,Double lon2) {
getDistance(Double lat1,Double lon1,Double
final int R = 6371; // Radious of the earth
Double lat1 = Double.parseDouble(args[0]);
Double lon1 = Double.parseDouble(args[1]);
Double lat2 = Double.parseDouble(args[2]);
Double lon2 = Double.parseDouble(args[3]);
Double latDistance = toRad(lat2-lat1);
Double lonDistance = toRad(lon2-lon1);
Double a = Math.sin(latDistance / 2) * Math.sin(latDistance /
//
//
//
//
2) +
Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) *
Math.sin(lonDistance / 2) *
Math.sin(lonDistance / 2);
Double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
Double distance = R * c;
return distance;
}
private static Double toRad(Double value) {
return value * Math.PI / 180;
}
}
Using KNN calculator for precise calculating
Knn Calculator:
package com.project.restaurantapp.Adapters;
import android.util.Log;
import com.project.restaurantapp.Model.Ambience;
import java.util.ArrayList;
22
//knn algorith using eculedian formula
public class KNNCalculator {
public static Double KnnDistance(Ambience first,Ambience Second){
Double d=0d;
Log.d("initres",
"("+first.toString()+"),("+Second.toString()+")");
//grading the price parameter
Double p1=calculateKnnPointPrice(first);
Double p2=calculateKnnPointPrice(Second);
//grading the music parameter
Double m1=calculateKnnPointMusic(first);
Double m2=calculateKnnPointMusic(Second);
//grading the type parameter
Double t1=calculateKnnPointType(first);
Double t2=calculateKnnPointType(Second);
d=Math.sqrt(Math.pow((p1-p2),2)+Math.pow((m1m2),2)+Math.pow((t1-t2),2));
return d;
}
//grading point for music in ambience
public static Double calculateKnnPointMusic(Ambience amb){
if(amb.music.equals("yes")){
return 2d;
}else if(amb.music.equals("no") ){
return 1d;
}
return 0d;
}
//Fast food-1
//Fast casual-2
//Casual dining-3
//Family-4
public static Double calculateKnnPointType(Ambience amb){
if(amb.Type.toLowerCase().equals("family") ){
return 4d;
}else if(amb.Type.toLowerCase().equals("casual dining") ){
return 3d;
}
else if(amb.Type.equals("fast casual") ){
return 1d;
23
}
else if(amb.Type.equals("fast food") ){
return 1d;
}
return 0d;
}
//grading point for price in ambience
public static Double calculateKnnPointPrice(Ambience amb){
Log.d("Knnprice", "calculateKnnPointPrice: "+ amb.price);
if(amb.price.toLowerCase().equals("high") ){
return 3d;
}else if(amb.price.toLowerCase().equals("medium") ){
return 2d;
}
else if(amb.price.equals("low") ){
return 1d;
}
return 0d;
}
}
24
Download