Professional Documents
Culture Documents
Nouman Karim
2015-KIU-0442
By
Nouman Karim
2015-KIU-0442
BS
in
Computer Sciences
iii
CERTIFICATE OF APPROVAL
Thesis Supervisor
Chairperson/Chairman/HOD
External Examiner
(External Examiner)
iv
DECLARATION
I’m dedicate this project is a presentation of our own work and that it has
not been submitted anywhere for any award. I also warrant, that I have not received
Signature
Signature
Date: ______________________________
Date: _____________________
v
ACKNOWLEDGMENTS
First of all, I am Thankful to Almighty Allah that I was able to do this project.
After that I want to thank my Parents for supporting me throughout my studies
from the start till now.
My supervisor Ms. Ponum Almas guided me so nicely and helped me to do this
project, I am also very thankful to her.
Nouman Karim
vii
ABSTRACT
Sabz Cafe is based-on Android mobile platform which help user to buy food
items online through an Android based Smart Phone by just sitting anywhere with
After installing the sabz cafe app, the users have to register and then they
can start looking for the food items of their choice from the list of menus. This
Cafeteria or Canteens play very important role in every schools, colleges, and
universities because it is the place where we can buy and eat to energized ourselves.
Customers (Students, faculty and other staff) went directly to the cafe, place
their order and get food at cafe. Due to increasing number of customers at
sabzazaar, a lot of time is wasted and seating facility is also limited. Therefore, this
app provides another facility to customers of sabzazaar to place their order using
their smart phones, admin process the order, and they can enjoy their order at their
This app is user friendly, effective and efficient application with significant
viii
TABLE OF CONTENTS
CERTIFICATE OF APPROVAL................................................................................................iv
DECLARATION......................................................................................................................v
ACKNOWLEDGMENTS.........................................................................................................vii
ABSTRACT............................................................................................................................viii
TABLE OF CONTENTS...........................................................................................................ix
LIST OF FIGURES..................................................................................................................xii
LIST OF TABLES...................................................................................................................xiv
ACRONYMS AND ABBREVIATION...................................................................................xv
Chapter 1...................................................................................................................................1
INTRODUCTION................................................................................................................1
1.1. Background...........................................................................................................1
1.2. Project Overview..................................................................................................1
1.3. Project Motivation................................................................................................1
1.4. Study Rationale and Relevance.............................................................................2
1.5. Problem Statement................................................................................................2
1.6. Aims and Objective..............................................................................................3
1.7. Main Modules of Project......................................................................................3
3.1.1. Efficient.............................................................................................................8
ix
3.1.2. User Friendly....................................................................................................8
3.1.3. Maintainability..................................................................................................8
3.1.4. Cost and Effective.............................................................................................8
3.2. Functional Requirements......................................................................................8
3.2.1. Login/Authentication........................................................................................8
3.2.2. Check/ Delete Orders........................................................................................9
3.2.3. Add Items...........................................................................................................9
3.2.4. Menu.................................................................................................................9
3.2.5. Setting.............................................................................................................10
3.2.6. Complaint Box.................................................................................................10
3.3 . System Environment.........................................................................................10
x
6.2. Testing................................................................................................................21
6.3. System Testing...................................................................................................21
6.4. Unit Testing........................................................................................................21
6.5. Integration and System.......................................................................................21
6.6. Test Cases...........................................................................................................22
6.7. Screenshots.........................................................................................................27
xi
LIST OF FIGURES
xiii
LIST OF TABLES
Figure 3. 1 Android Studio.....................................................................................................11
Figure 3. 2 XML.......................................................................................................................12
Figure 3. 3 JAVA......................................................................................................................13
Figure 3. 4 Firebase.................................................................................................................14
xiv
ACRONYMS AND ABBREVIATION
xv
Chapter 1
INTRODUCTION
1.1. Background
Nowadays everyone has got smart phones in their hands and that too
expensive ones whether they are teenagers, adults or old people.
This has benefitted the mankind a lot and has made lives of everyone easy and
convenient that no one might have ever imagined that things will get this much
simpler and easier. And there are so many social networking websites and application
services which provides almost every type of services and these social networking
websites and apps have took the internet by storm. This Android app is like an
ecommerce apps or websites where we buy some items then the items will be
delivered to our location or address. Once the user will be registered in our app then
the user will easily buy items.
After the delivery of the items the user has to give the extra 10 rupees for the
delivery charges. If you have issues about the item, delivery, or even the prices, then
you should be able to complain by using this app.
1
commerce app where we search and buy food items from university cafe, these items
will be delivered to our required location. We are familiar with the need of canteen,
cafes at Schools, colleges and universities and also with the problems of
canteens/cafeteria that the students/employees usually faced. Being a student at KIU I
realized the limitation of services the sabzazaar cafe is providing to their customers
(students, faculty, employees), this point motivated me to develop this APP to
facilitate the customers to place their order in some click at their required place.
If a student got minimum time lifted to attend the lecture and at that time,
she/he is too hungry and wants something to eat, then he/she have to go to the
cafeteria, buy something, eat and then attend the lecture, so this way he/she have
to face a problems. The daily cash transaction of the cafeteria is store in cash
book, what if the cash book is lost or is not maintained.
2
amount of seat sometime it become difficult to place order. Also, it is a time-
consuming process, therefore another facility of online service was always needed.
Everyone is using cell phone therefore an android base application is developed for
sabzazaar KIU, this application facilitates the customers (faculty, students, admin
staff) to search and order food items at their required place on required time. This
application also provides an option of suggestion/complain box to get their customer
feedback on food items and delivery process.
In this feature the admin will logged in to his dashboard where he will
manage the orders, food items.
Add Food Items
When the Admin logged in to its dashboard then the first thing, they need to
do is to tap on the one of the categories of the item. After that the admin will have
to write the item name, description, price and for image uploading the admin will
3
have to tap on the image icon.
After filling the fields and image the admin will tap on the ADD
PRODUCT button.
Customers Order
In this feature the admin will check the new orders from the users and also the
admin has the authority to delete the orders after delivered.
Maintain Food Items
In this feature the admin has the authority to manage items. For example:
If an item is finished in the cafeteria or not available then the admin will tell
the user that this product isn’t available for now.
4
Setting
In this feature where user edit his/her profile by tapping the setting option
from the navigation drawer. This feature allows changing phone number, name, address and
picture.
Complaint Box
If something goes wrong with the items, prices, delivery or with the
application then this feature allows you to submit complains. Most of the android
applications don’t have this feature.
5
Chapter 2
REVIEW OF LITERATURE
6
1.2.3. Complex
Most of the apps like this are very complicated to use and every user who are
not so much familiar with mobile phones cannot use those apps easily. While this app
is totally user friendly and very simple to use, almost everyone who has even a
smaller knowledge about smart phones can use this app easily.
7
Chapter 3
REQUIREMENT SPECIFICATION
3.1.1. Efficient
After installing this app on smartphones, it will give the complete solution for
the problem of users in an efficient manner.
3.1.3. Maintainability
As this app is designed in a user-friendly way so its maintenance is very easy
and as we know maintenance is always an important factor in any kind of system.
Users can change their password anytime they want to secure their account and can
also change their personal details so their profiles will always remain up to date.
3.2.1. Login/Authentication
Description:
This is the first screen after splash in the application. The admin must
be identifying in order to access any options.
8
Functional Requirement:
This screen contains two fields to enter valid details in order to access
dashboard.
Phone Number
Password
Functional Requirement:
This screen will contain only the orders from the user and if the order
is successfully delivered, the admin has to tap on the order to delete.
3.2.4. Menu
Description:
This is the place where all the items will show and if a user wants to buy
an item, just tap on one of the items. After tap on the item the complete detail of
the item will be show.
Functional Requirement:
This screen contains the details of the item and also the Add to cart list
icon.
9
Item Image
Item Name
Item Description
Item Price
Item Description
Added to Cart Button
3.2.5. Setting
Description:
The user will edit his/her profile.
Functional Requirement:
This screen contains the details of the user.
User Image
User Phone Number
User Name
User Address
10
3.3.2. Software Requirements
Operating System for PC: Windows 8/8.1 or updated
Operating System for Mobile: Android 4.4 Kitkat or updated
Tools: Android Studio
Front end: JAVA, XML
Back end: Firebase
Android Studio IDE is selected to build the front end of application. It is the
official IDE for Android mobile development launched by Google in 2013. This IDE
is the right choice because it is built and tailored for Android mobile development to
make the development process faster and easier. In addition to other related tools, it is
also open source to encourage the development of more and more android
applications, and makes android newcomers easier to learn, especially with the vast
android development community, the community provides thousands of free Online
tutorials and platforms to assist developers.
11
Figure 3. 2 XML
Year Started
1996
Developed by
World Wide Web Consortium
Extension
.xml
Declaration
12
Figure 3. 3 JAVA
13
Figure 3.4. 1 Java Code
Figure 3. 4 Firebase
Firebase first product was the Firebase Real-time Database, an API that
synchronizes application data across IOS, Android, and Web devices, and stores it on
Firebase’s cloud. The product assists software developers in building real-time,
collaborative applications. It is a mobile and web application development platform
developed by Firebase, Inc. in 2011, then acquired by Google in 2014 .[III.] As of
October 2018, the Firebase platform has 18 products, [IV.] which are used by 1.5million
apps.[V.] Firebase is a NoSQL database, it is just a big JSON object where we will be
able to store our data. Unlike SQL there’s no schema for the database, no tables, no
columns, its’ just a combination of key/value pairs. For example
14
Chapter 4
SYSTEM DESIGN
4.1. Introduction
System designing is an important part of every system and application in this
chapter we will discuss the front-end and back-end design of our Android application
Sabz Cafe.
4.3. Database
15
Firebase Storage
Firebase Storage provides secure file uploads and downloads for Firebase
apps, regardless of network quality. The developer can use it to store images, audio,
video, or other user-generated content. Firebase Storage is backed by Google Cloud
Storage. [VIII.]
Firebase Hosting
Firebase Hosting is a static and dynamic web hosting service that lanched on
May 13, 2014. It supports hosting static files such as CSS, HTML, JavaScript and
other files, as well as support through Cloud Functions. [IX.]
The service delivers files
over a content delivery network (CDN) through HTTP Secure (HTTPS) and Secure
Sockets Layer encryption (SSL). Firebase partners with Fastly, a CDN, to provide the
CDN backing Firebase Hosting. The company states that Firebase Hosting grew out
of customer requests; developers were using Firebase for its real-time database but
needed a place to host their content. [X.][XI.]
Crashlytics
Crash Reporting creates detailed reports of the errors in the app. Errors are
grouped into clusters of similar stack traces and triaged by the severity of impact on
app users. In addition to automatic reports, the developer can log custom events to
help capture the steps leading up to crash. [XII.]
Before acquiring Crashlytics, Firebase
was using its own Firebase Crash Reporting.
Firebase Test Lab
Firebase Test Lab for provides cloud-based infrastructure for testing Android
and ios app. With one operation, developers can initiate testing of their apps across a
wide variety of devices and device configurations. Test results—including logs,
videos, and screenshots—are made available in the project in the Firebase console.
Even if a developer hasn’t written any test code for their app, Test Lab can exercise
the app automatically, looking for crashes. [XIII.]
16
4.4. Flowchart
17
4.5. Data Flow Diagram
A data flow diagram (DFD) is a graphical representation of the "flow" of
data through an information system, modeling its process aspects. A DFD is often
used as a preliminary step to create an overview of the system without going into
great detail, which can later be elaborated.
External Entity
External entity is an outside system which is used to receive or send data or
information to the system
Round corner rectangle is used to represent external entities.
Process
Process changes data produce an output based on computations or sort data
based on logic. Short labels are used to describe the process such as “locate”. Oval
shapes are used to show a process.
Data Store
File and repositories that store data and information for later use.
Data Flow
Data flow is the routes through which data are transferred between different
entities. Data flow represented by a line with arrow head.
18
4.5.2. DFD Level 1
Below this figure shows the flow of user and admin activity.
19
Chapter 5
SYSTEM IMPLEMENTATION
20
Chapter 6
6.1. Introduction
Before launching any app, testing and implementation is very important
process because through this step, we get to know whether the application is working
properly or not and working according to our requirements. To check the
functionalities, we put some inputs and observe the output of the system to check if
there are any bugs or errors in the application so it can be removed. The main purpose
of this phase is to check the overall functionalities and fulfill the user requirements.
6.2. Testing
Before handover the application or any system to users. The developer or
programmers of that application/system have to test the application in order to check
the defects in the application and the application is working properly or not. If any
defect or bug is found then it needs to be removed first and this process will repeat
until every small bug is removed. If the developer is satisfied with the process then
testing process will end and the application will be ready to handover to the end-user.
21
ensure that the integrated sub-components are giving proper functions or not. System
iteration is the process through which sub-components are combined together to make
a whole one system. So that here this test had implemented and results are according
to the functions what are required.
Table 1
Above this figure shows the test results of user registration in sabz cafe app.
22
Test case #2
Table 2
Select Food items Chips, Samosa Food Items will store in the Pass
from the dashboard. user cart list.
Above this figure shows the test results of dashboard in sabz cafe app.
Test case #3
Table 3
23
add Food items from the
dashboard”
Above this figure shows the test results of cart list in sabz cafe app.
Test case #4
Table 4
Above this figure shows the test results of user sign out in sabz cafe app.
Test case #5
Table 5
24
dashboard.
Above this figure shows the test results of login activity in sabz cafe app.
Test case #6
Table 6
Above this figure shows the test results of user orders in sabz cafe app.
25
Test case #7
Table 7
Above this figure shows the test results of admin sign out in sabz cafe app.
26
6.7. Screenshots
Splash
The figure 6.2 is the first screen that appears when the application is
launched. It just contains the logo of the application.
27
Main Screen
This Figure 6.3 is the Main Screen that appears after the splash screen. If you
are not registered yet, you should tap on the GET STARTED button and if you
already registered, just tap on the LOGIN button.
Sign Up Screen
The Figure 6.4 is the Sign-Up screen where you have to create your account.
28
Login Activity
The Figure 6.5 and Figure 6.6 is the Login screens for user and admin, where
you have to type phone number and password to use sabz cafe application.
29
User Activity
The Figure 6.7 is the Main Screen/Dashboard for user and it contain all the list
of food items, where users have to select the desired items.
The Figure 6.8 is the Navigation Drawer Screen; it contains a lot of options for
the user such as Cart, Search, Setting, Complaint Box and Logout.
30
The Figure 6.9 is the Item Detail Screen that appears when you tapped on the
item from main screen. It contains item name, description, price and increment
decrement button. This button shows the quantity of the item/product.
The Figure 6.10 is the Search Item Screen for user which allows you to search
an item. To search an item, you have to capitalize the first letter of the item name and
then tap on the search button.
31
The Figure 6.11 is the Cart Screen, which contain all the items which you
selected from main screen/ dashboard and the Figure 6.12 is the Confirm Order
Screen, where you have to type your name, phone number and the location of your
where you want your order to be delivered.
32
The Figure 6.13 is the Complain Screen, which allows you to complain about
items, prices, delivery, or even with the app then this screen allows you to submit you
complain to the admin.
The Figure 6.14 is the User Profile Setting Screen for user, which allows you
to edit your profile.
33
Admin Activity
The Figure 6.15 is the Dashboard Screen for the admin. It allows the admin to
view and delete the users order and also adding new food items.
The Figure 6.16 is the Order Screen; it contains all the orders of the users.
34
The Figure 6.17 is the adding new items screen for admin. It appears when you
tapped on one of the collection of items from dashboard. For adding new item, you
have to type the new item name, description, price and also the image.
35
6.7.2 Server Side
Firebase
This is the firebase database screen, where all users and the admin data store in
JSON format.
Figure 6. 18 Firebase
36
Chapter 7
CONCLUSION
In the end we can conclude that this Sabz Cafe app can make the whole
system easy for those people who want something for lunch, instead of going to the
cafeteria.
The main idea of this project was to provide such service for the students,
professors and staff, who don’t want to miss their class or don’t want to waste their
time by going to the cafeteria.
So, this app can help those people by just registered to this app. After the
registration and login, the user dashboard will be appeared, this is the screen where
user will select the item and the item will be delivered within 3 or 5min.
37
REFERENCES
Books References
38
Websites
https://www.webopedia.com/TERM/J/Java.html
https://stackoverflow.com/
https://www.w3.org/XML/
http://www.theserverside.com/definition/Java
https://simple.wikipedia.org/wiki/Java_(programming_language)
https://en.wikipedia.org/wiki/Firebase
https://gonehybrid.com/firebase-database-best-practices/
https://www.techjuice.pk/mobile-phone-users-in-pakistan-crosses-161-
million-mark/
39
Appendix A
40
Appendix B
41