Anda di halaman 1dari 59

Get It on Demand

Jehangir khan Muhammad Suleman


051-12-118025 051-11-116067

Fazllullah Khan Amir Khan


051-10-113538 051-13 -118103

Mr. Zulfiqar Ali Bangash

A Final Year Project Report is

Submitted in Partial Fulfilment of the

Requirements for the Degree of

Bachelor of Science in Computer Science

Department of Computing & Technology

Iqra University, Islamabad Campus

October 2017
Certificate

We hereby accept the work contained in this report titled: “Get It on Demand”, as a confirmation to the
required standards for the partial fulfillment of the degree of Bachelors of Science in Computer Science.

Internal Examiner External Examiner

Project Supervisor Head of Department


Declaration
I hereby declare that this work, neither whole nor in part, has been copied from any source. It is further
declared that I have prepared this report entirely on the basis of my personal efforts made under the
sincere guidance of teachers especially my supervisor Mr. Zulfiqar Ali Bangash. If any part of this
thesis is proved to be copied out from any source or found to be reproduction of some other, I will stand
by the consequences. No portion of the work presented has been submitted in support of any application
for any other degree or qualification of this or any other university or institute of learning.

Jehangir Khan (18025)

Amir Khan (18103)

Muhammad Suleman (16067)

Fazllullah Khan (13538)

i
Dedication
I dedicate this project to my Parents and teacher who support and motivate us at every stage of our
degree. Also, without prayers of our parents it could not have been possible.

ii
Acknowledgements
First of all, thanks to Allah Almighty, the most merciful and beneficent. Who helped us to complete the
project, we are especially thankful to our parents and family members who supported us at every aspect
of life.

We are also very thankful to our supervisor Mr. Zulfiqar Ali Bangash, who provided us guidance and
motivation at every instant we needed. We also especially thankful to all instructors who motivated us
to achieve the goals.

iii
Abstract
The project “Get it on demand” is automation system of the taxi system, it has two different platforms.
Admin panel, driver application, and user application. Both the user and driver applications are
developed in android studio using java programming language while the admin panel is web based.
Driver application register the information of driver through signup activity, while admin panel gives
him authentication and provide the taxi. Also, driver application can receive request from clients. While
admin keep an eye on this process through the panel.

User application have ability to show the nearest taxi on the map, and just for one push, application
send notification to nearest driver to pick up from the desired location and drop off to the desired
destination.

iv
Table of Contents
Declaration............................................................................................................................................ i

Dedication ............................................................................................................................................ ii

Acknowledgements............................................................................................................................. iii

Abstract............................................................................................................................................... iv

List of Figures ................................................................................................................................... viii

List of Tables ...................................................................................................................................... ix

Chapter 1 Introduction ..................................................................................................................... 1

1.1 Overall Description ................................................................................................................. 2

1.1.1 Objectives ......................................................................................................................................... 3


1.1.2 Problem Description ......................................................................................................................... 3
1.1.3 Methodology ..................................................................................................................................... 3
1.1.4 Product Scope ................................................................................................................................... 4
1.1.5 Business Context .............................................................................................................................. 4
1.1.6 User Classes and Characteristics ...................................................................................................... 4
1.1.7 Operating Environment ..................................................................................................................... 4
1.1.8 Assumptions and Dependencies ....................................................................................................... 5
1.2 Functional Requirements ........................................................................................................ 5

1.2.1 Account Registration ........................................................................................................................ 5


1.2.2 Login Requirement ........................................................................................................................... 6
1.3 External Interface Requirements ............................................................................................. 6

1.3.1 User Interfaces .................................................................................................................................. 6


1.3.2 Hardware Interfaces .......................................................................................................................... 6
1.3.3 Software Interfaces ........................................................................................................................... 6
1.3.4 Communications Interface ................................................................................................................ 7
1.4 Scenarios ................................................................................................................................. 7

1.5 Report Structure ...................................................................................................................... 7

Chapter 2 Literature Review ............................................................................................................ 8

2.1 Introduction ............................................................................................................................. 9

2.2 Related Works ......................................................................................................................... 9

2.2.1 Terminology ..................................................................................................................................... 9


2.2.2 Categorization of Existing Techniques/Works/Research .................................................................. 9

v
2.2.3 Limitations/Gaps within Existing Techniques/Works ...................................................................... 9
2.2.4 Proposed Improvements in Existing Works .................................................................................... 10
2.3 Summary ............................................................................................................................... 10

Chapter 3 System Design ................................................................................................................ 11

3.1 Introduction ........................................................................................................................... 12

3.1.1 Purpose ........................................................................................................................................... 12


3.1.2 System Overview ............................................................................................................................ 12
3.1.3 Design Map ..................................................................................................................................... 13
3.1.4 Definitions and Acronyms .............................................................................................................. 15
3.2 Design Considerations .......................................................................................................... 15

3.2.1 Assumptions ................................................................................................................................... 15


3.2.2 Constraints ...................................................................................................................................... 16
3.2.3 Risks and Volatile Areas ................................................................................................................. 16
3.3 Architecture........................................................................................................................... 16

3.3.1 Overview ........................................................................................................................................ 16


3.3.2 Module ............................................................................................................................................ 16
3.4 Database Schema .................................................................................................................. 17

3.4.1 Tables.............................................................................................................................................. 18
3.5 Work Flow Diagram ............................................................................................................. 18

3.6 High Level Design ............................................................................................................... 19

3.7 Low Level Design ................................................................................................................. 19

3.7.1 Use Case Diagram .......................................................................................................................... 19


3.7.2 Sequence Diagram .......................................................................................................................... 21
3.8 User Interface Design............................................................................................................ 21

3.8.1 Application Controls ....................................................................................................................... 21


3.8.2 Screenshots ..................................................................................................................................... 22
3.9 Summary ............................................................................................................................... 31

Chapter 4 Implementation .............................................................................................................. 32

4.1 Discussion ............................................................................................................................. 33

4.2 Development Methodologies ................................................................................................ 33

4.2.1 Web Server ..................................................................................................................................... 33


4.2.2 Cloud Database ............................................................................................................................... 33
4.2.3 Custom API .................................................................................................................................... 34
4.2.4 Nearest Location ............................................................................................................................. 34

vi
4.3 Implementation Tools and Technologies .............................................................................. 34

4.3.1 Android Studio................................................................................................................................ 34


4.3.2 Eclipse ............................................................................................................................................ 35
4.3.3 Bootstrapping .................................................................................................................................. 35
4.3.4 Apache Tomcat server .................................................................................................................... 35
4.4 Summary ............................................................................................................................... 35

Chapter 5 Testing ............................................................................................................................ 36

5.1 Testing Techniques ............................................................................................................... 37

5.1.1 Black Box Testing .......................................................................................................................... 37


5.1.2 Unit Testing .................................................................................................................................... 37
5.1.3 Integration Testing .......................................................................................................................... 37
5.1.4 System Testing................................................................................................................................ 37
5.2 Test Cases ............................................................................................................................. 37

5.2.1 Test Case 1 ...................................................................................................................................... 38


5.2.2 Test Case 2 ...................................................................................................................................... 38
5.2.3 Test Case 3 ...................................................................................................................................... 38
5.2.4 Test Case 4 ...................................................................................................................................... 39
5.2.5 Test Case 5...................................................................................................................................... 39
5.2.6 Test Case 6 ...................................................................................................................................... 40
5.2.7 Test Case 7 ...................................................................................................................................... 40
5.3 Summary ............................................................................................................................... 40

Chapter 6 Conclusions and Future Work ..................................................................................... 41

6.1 Contributions......................................................................................................................... 42

6.2 Findings................................................................................................................................. 42

6.3 Future Improvements in the existing System ........................................................................ 42

References......................................................................................................................................... 43

Appendices ....................................................................................................................................... 44

Appendices A: Screenshots ............................................................................................................ 45

Appendices B: Plagiarism Report ................................................................................................. 48

vii
List of Figures
Figure 3.1 : User System Overview ...................................................................................................... 12
Figure 3.2 : Admin Panel Overview ..................................................................................................... 13
Figure 3.3 : User Application Overview ............................................................................................... 14
Figure 3.4 : Driver Application Overview ............................................................................................ 15
Figure 3.5 : Architecture Diagram ........................................................................................................ 16
Figure 3.6: ERD .................................................................................................................................... 17
Figure 3.7 : Work flow diagram............................................................................................................ 18
Figure 3.8 : System Architecture .......................................................................................................... 19
Figure 3.9 : Use case Diagram .............................................................................................................. 20
Figure 3.10 : Activity Diagram ............................................................................................................. 20
Figure 3.11 : Sequence Diagram ........................................................................................................... 21
Figure 3.12 : Application Controls ....................................................................................................... 22
Figure 3.13: Sign in/ Sign up Activity USER Application ................................................................... 22
Figure 3.14 : Driver Application ........................................................................................................... 23
Figure 3.15 : First Activity after sign in................................................................................................ 23
Figure 3.16 : Ride card.......................................................................................................................... 24
Figure 3.17 : Admin First Page ............................................................................................................. 24
Figure 3.18 : Clicking in Home Navigation Bar ................................................................................... 25
Figure 3.19 : Clicking in Home Navigation Bar (Driver panel) ........................................................... 25
Figure 3.20 : Ride now Button activity ................................................................................................. 26
Figure 3.21 : Ride Now Notification to Driver ..................................................................................... 26
Figure 3.22 : Driver card view of Orders .............................................................................................. 27
Figure 3.23 : Driver Options ................................................................................................................. 28
Figure 3.24 : Location ........................................................................................................................... 28
Figure 3.25 : Admin First Page Vehicle View ...................................................................................... 29
Figure 3.26 : Drivers list (add/delete/update) ....................................................................................... 29
Figure 3.27 : History of Rides............................................................................................................... 30
Figure 3.28 : Records of the Passengers ............................................................................................... 30
Figure 3.29 : Notification for Offers to both Client and Driver ............................................................ 31
Figure 3.30 : Location of the Peoples related to the Application.......................................................... 31
Figure 4.1: Andriod Studio................................................................................................................... 34
Figure 4.2: Eclipse................................................................................................................................ 35
Figure 4.3: Apache Tomcat Server....................................................................................................... 35

viii
List of Tables
Table 2.1: Comparison to other Application ........................................................................................10
Table 5.1 : Test Case 1 .......................................................................................................................... 38
Table 5.2 : Test Case 2 .......................................................................................................................... 38
Table 5.3 : Test Case 3 .......................................................................................................................... 39
Table 5.4 : Test Case 4 .......................................................................................................................... 39
Table 5.5 : Test Case 5 .......................................................................................................................... 39
Table 5.6 : Test Case 6 .......................................................................................................................... 40
Table 5.7 : Test Case 7 .......................................................................................................................... 40

ix
Chapter 1 Introduction

i
1.1 Overall Description
Get It on Demand application is computerized reservation system of cab, if someone request from his
mobile using android application installed on mobile phone whenever needed. Hiring of a cab will be
available on single click. An android application will be designed for the communication between cab
and passenger installed on mobile phones. The reservation system is not only limited for booking, it
also shows the location, route, estimated fare, estimated time as well as shortest path to destination. It
also shows the low and high traffic route for mitigation of fare and time. The main theme of this project
is to secure traveling as it records the passenger address as well as the driver and cab detail in the
database system.

This project is based on android application using GPS and internet. Calling a cab will be possible in
the presence of GPS and internet and android based phone. There will be three main parts of this
application, two parts will be android based and one part will be designed in web using bootstrap
framework. Below are the parts of application.

• Admin panel
• Driver application
• Client/User application

Admin panel is a web based application which has the ability to add/drop the taxi and driver, sending
notifications to clients and drivers through firebase. Admin can see the location of current taxi
drivers/passengers on map and also current rides. After the completion of rides, all information about
ride is saved into database can be view through admin panel.

Driver application automatically shows and update driver current location and send to webserver using
background service. Webserver keep on updating the current location of driver in database. Driver
application also receive notifications from awaiting passengers as well.

Passenger/User application is same as driver application, it automatically shows and update passenger
current location automatically and sore it into database with the help of webserver. Also, having the
ability to calculate the nearest location of the taxi driver from passenger, and send request to pick up
from the desired location.

As we know that now a day everything become advance. People are trying to get everything easily with
security. For this purpose, we developed “Get It On Demand”, which is complete automation of taxi
system. People can call the taxi from anywhere either at home or office using this system. And taxi will
arrive in few minutes and people will ride secure to anywhere they want.

2
1.1.1 Objectives
The Objectives are:

• Secure journey
• Automation of Taxi system
• Time saving
• Low budget journey
• Get the taxi through mobile

This system automates whole taxi system. Now reaching destiny is much easier and secure.
This system has decreased the travelling time and extra fare charging.

1.1.2 Problem Description


As we are in 21st century so people need automation and easy ways to do their work. If we see
around, taxi cabs are used by everyone in daily life routine. In reservation of taxi cabs, we have
few issues, first we have to reach the specific route and then we are not assuring if we can get
a cab on that route. So, there are three basic problems, first problem is confirmation of cab in
that route. Second problem is, its time consuming. And the third problem is security issue. So,
to solve those problems we developed an online reservation cab system to make reservation of
cabs easy, to secure our journey and less time consuming. We developed this application in two
platforms. The passenger and driver application will be developed in android platform while
the Admin panel will be developed in web.

1.1.3 Methodology
For attempting the problem description, we developed application for android operating system.
This application is developed using android studio. Android studio is platform for developing
android applications. It is freely available and provide many functionalities. And for web admin
panel, we used eclipse compiler. For running the web admin panel, we use the tomcat apache
server 8.0. we wrote our own customized API’s to get access and insert information in database.
For database we used php myadmin local host. We create our whole database with tables in
wamp server. The admin panel takes data from phpmyadmin and give it to android interface.
Also, when client signup there accounts they will store in phpmyadmin with the help of
webserver and then the webserver inserts it into database table. Also, keep the updated location
of both client and taxis.

In our application, we used the google map API for finding different routes, and through GPS
we collected the location of both (client and driver), the collected location is then saved into
the database through webserver. We used custom algorithm to find nearest taxi around the

3
client. The algorithm will take the location of client and will calculate the distance of taxi
location. Then client will receive location of nearest taxi. After that they can communicate with
each other and client can book cab.

1.1.4 Product Scope


In our project, the main scope is making a safe and secure journey through cab reservation
system. The project contains three apps, Admin panel, driver application, and passenger/user
application.

In this application, we provide service to call the cab through your location with the help of
GPS and Internet. And we used custom algorithm to find shortest path which help client to find
which taxi is near to him, and we also provide the detection of traffic on that route too.

We are now focusing to extend this service in Islamabad then after the completion of the project
we will spread it into all over Pakistan and may be to international countries as well.

• This system has made our current taxi system automatic.


• The system shows the shortest path to the desired area.
• The system shows the nearest taxi.
• The system shows the traffic on the route.

1.1.5 Business Context


This project is very beneficial for the business point of view. Because using this application no
need for further investment. Only management of admin panel have to be done. If proper
marketing is done for this application, we can do better business. The cab drivers also need this
sort of application, this will increase their daily customers and clients can get cab at their home
door.

1.1.6 User Classes and Characteristics


Fragments are the most important classes through which user will interact and use the
application.

1.1.7 Operating Environment


The compiler which we are using for this application is android studio and for webserver we
are using eclipse. GPS and Internet are most essential things for this application. Also, as we
told this before that this project consists of three panels. Wamp server is used for database.

• Admin Panel: Admin panel is web based panel. Which can be accessed from browser of
personal computer and mobile.
• Driver and User application: Driver and user applications will only run on android
operating system devices.

4
1.1.8 Assumptions and Dependencies
The following are the assumptions of the project.

• The application will give us the correct location on map.


• The system will search the nearest taxi driver to the passenger area.
• The system will pick passenger/user from his/her current location and drop to his/her
desired location.
• The taxi organization/company can use this system to increase their profit.

The project depends on the following things.

• Internet
• GPS
• Web Server.
• Android Operating System

1.2 Functional Requirements


The application will be able to register new users/clients and drivers; the application will also be able
to search nearest taxi.

1.2.1 Account Registration

1.2.1.1 Description
In this application, there are two types of Registration. First one is registration of user/client
and second registration is for taxi driver in Get it on demand system.

1.2.1.2 Criticality
If the user/client and driver/car owner is not registered with our system. He/she will not be the
apart of this system to communicate with each other.

1.2.1.3 Cost and schedule


As we know there are two applications. The first application is passenger/user application
which is totally free. And the second is driver application which will be charged some
percentage of each ride.

1.2.1.4 Risks
The only risk of this application is the fake accounts from client side. i.e. Account defaulters
and the car Rubbery.

5
1.2.2 Login Requirement

1.2.2.1 Description
The user/clients can login if they have successfully registered them with our application, same
applies to driver application. The driver signup will be completed after admin approval.

1.2.2.2 Criticality
If user/client of “get it on demand” is not sign in he/she cannot use these services of the
application. Same for the driver panel.

1.2.2.3 Cost and schedule


No cost applied on the usage of this application, it’s totally free.

1.2.2.4 Dependencies with other Requirements


We have already described above that this application depends on internet and GPS. This
application will not work if internet is not available.

1.3 External Interface Requirements


1.3.1 User Interfaces
We have three panels. The Admin panel is formed in web based which can be accessible from
anywhere either from Android phone, windows phone, Windows ETC, because it need only
browser and internet to be access and its layout is developed using word press and bootstrap,
so this system is responsive and much smart, beautiful to see. While the Driver and client
applications are android based and having same like interfaces. Little difference in its layout.
Which will be further explain in chapter 3.

1.3.2 Hardware Interfaces


The following are the hardware interfaces

• Pavilion HP Core I 5
• Having 6GB RAM
• Samsung J7
• Samsung Note 2

1.3.3 Software Interfaces


The following software’s are used to make this application given below:

• Android 4.4.1 Kit Kat: we use Samsung J7 having Marshmallow but for this application
must be at-least Kit Kat.
• Window 10: HP laptop with window 10.
• Tomcat Apache Server and Wamp Server.

6
1.3.4 Communications Interface
We developed our custom API and Tomcat apache server to communicate with client to
database and database to driver and vice versa.

1.4 Scenarios
The scenario for this application is: If a client wants to ride using online taxi system in “Get it on
demand” they must create their accounts and assure the availability to the database and the server. Once
creating of account is done, the client can use this application to get a cab by pushing one click through
GPS and Internet. In second hand if we talk about the driver application. Driver also must create account
and verify himself from company then they will receive the notification from server to pick up the
passenger from his/her location. If driver wants to join the company, the admin panel will verify the
driver information and signs agreement with him/her. And admin panel will show all the taxies in map.

1.5 Report Structure


This report is divided into many sections because researcher passed through various stages for reaching
the conclusion of the report. Chapter 2 is of Literature review. Chapter 3 is of System design
specification. Chapter 4 is testing and finally the conclusion and future work.

7
Chapter 2 Literature Review

8
2.1 Introduction
We are in the 21st century the regime of reboots, everyone is eager to find easy way for the task
completion. Specially searching a taxi cab. Most of people use taxi cab day in and day out a very hectic
task. Now a day a taxi ridding is very difficult because firstly you will go to the taxi station and search
taxi, after searching hours we are still not sure if we can reach our destination on time. So, for these
issues we think that we should make an application through which people can ride from their location
through mobile phone and with the secure journey. So, this will make the taxi system very reliable,
secure, and easy as well.

2.2 Related Works


Many companies i.e. Uber done similar work but they are just to pick someone from their location.
Which is not a complete application neither that application told us about the nearest taxi to the area.
Also, there is nothing like the fixed price per kilo-meter. We made an application which will pick the
passenger and drop them to the desired location with fix price rate. This application will show the
nearest taxi around the passenger and tell the shortest path to the driver.

2.2.1 Terminology
As we know that, past few years’ technology keep on changing, now they are finding the way
to make everything possible using mobile phone. Due to day by day increasing in the
technology. We think that there must be the system which should manage the taxi system
automatically. Just clicking of one button taxi come to the area and pick the passenger and drop
him to his desire area.

2.2.2 Categorization of Existing Techniques/Works/Research


One of the software companies developed an application called uber [1]. But this application
helps to pick and drop passengers. We do not consider it as a complete application neither that
application told us about the nearest taxi in desired area. Also, there is nothing like the fixed
price per kilo-meter. We developed an application which will help to pick passenger and drop
them to the desired location with the fixed price rate. Then we made this application having the
all functionalities i.e., show the nearest taxi around the passenger and tell the shortest path to
the driver. These all are included in our project. There was more application like taxi caller [2].
Which gave facility to getup you from your location. But there is much problem in their
interface, crashes etc.

2.2.3 Limitations/Gaps within Existing Techniques/Works


Previously developed applications are not giving proper functionality. They are not a complete
application neither that application told us about the nearest taxi to the area. Also, there is
nothing like the fixed price per kilo-meter. We made an application which will help to pick the
passenger and drop them to the desired location with the fixed price rate.

9
2.2.4 Proposed Improvements in Existing Works
We developed this software to provide the proper way for passenger to travel and give them the
best service. In this project, admin panel have privilege to manage the records of both (drivers
and clients), and for the client to find nearest taxi with the fixed price system. We linked the
webserver or database, passengers end and driver’s ends to communicate with each other. We
are providing the service for the passengers to find taxi in no time, this was necessary because
if a user came from other city and does not know the locations of the taxi, map will help him a
lot to contact to the taxi. Now we apply this application on local webserver.

2.3 Summary
In this chapter, we wrote about the mechanism which will be follow to complete this project. Taxi
finding is a major issue in the area, peoples waste their time because of no taxi nearby. Either they will
find it in taxi stop. Many developers have developed many taxi applications, unfortunately there are a
lot of functions which are not working properly or they may have left behind lot of functionalities. Due
to lack of functionality the passengers don’t use their applications. We describe a system which linked
all the taxi’s connected to the company, clients and drivers. The system is made using map functionality
so that if a passenger has come from any location he can easily find the taxi to reach the desired location.

Serial
Uber Taxi Caller Get it on demand
No.
1 Just Show the location of another Showing location with
Showing location
person shortest path
2 Traffic detection of
No traffic detection on route No traffic detection
route
3 No shortest path on Show shortest path on
No shortest path on map
map map
4 No Run time tracking on map No run time tracking Live streaming of
on map tracking on map

TABLE 2. 1 : COMPRESSION TO OTHERS APPLICATIONS

10
Chapter 3 System Design

11
3.1 Introduction
The Application is designed to provide a technique to help passenger to find nearest taxi in their area.
Also, the taxi will get the passenger location and pick him from his location through map. The
application is developed in android studio which we used for every android device such as Tablet,
emulators, smart phones etc. we use Eclipse for made a web server to store data in database
“Phpmyadmin” and retrieve the data from database.

3.1.1 Purpose
This part of report is to deliver all about the layouts of the implemented code.

3.1.2 System Overview


Here we defined the flow of our application. There are two android applications and one admin
panel. Initially there will be two scenarios. First user will be in login menu where he can login
but if he hasn’t register himself yet, he will be asked to register account. For registration, user
has to enter his details on registration page first name, last name, email, CNIC, address, mobile
number. After this application will generate a verification code and send it to the user’s email
address by using API [3]. User will enter the code into the application then after verification
the account will created.

Second Scenario is login, where user will enter his user name and password in application
login page, application then connects to the server using customized API’s [4]. [5] and check
login information provided by user, if the details are correct user will be logged in. After login,
the location of the user will be updated in database (Azure) by collecting his location using
GPS, and updated through webserver. The Figure 3.1 shows the user system overview and
different stages through which the application will go through.

F IGURE 3.1 : USER SYSTEM O VERVIEW


Second part is driver application, on the other side same process for driver will be done, his
location updating, sign up and registration process is same as user/passenger. All the idle driver
location will be updated in the map.

12
If user click on ride now, then a request is sent to a web server for a nearest driver we have
applied an algorithm that server will choose the shortest driver available on the map. The driver
application has choices accept, reject, in route a user ride request sent by web server. If he
accepts the request webserver will send his location through GPS [5, 6], arrival time, car name,
contact detail, etc. to the user application. Driver will pick the user from his location and then
user will choose drop off location.

The third main part of application is admin panel shown in the Figure 3.2. Admin has the
authority to register car, driver using his detail. Admin can view location of all the drivers,
users, current rides, etc.

F IGURE 3.2 : ADMIN P ANEL O VERVIEW


3.1.3 Design Map
As there are different interfaces in the project, so different flows for of the application exist.
First is user/passenger application, second is Driver application. The design map is given
below:

13
3.1.3.1 User Application
User application overview is shown in Figure 3.3, which describes the user application
working. User can sign in or sign up. For sign up the full information will be required i.e.
First Name, Last Name, Mobile number, CNIC, Address. Etc. then the data will save in
database through web server. While if someone sign in. the web server will check if the user
is registered or not. If user is registered, then the application Map fragment [6] will open and
get the location of user and update in database.

F IGURE 3.3 : USER APPLICATION O VERVIEW


3.1.3.2 Driver Application
Driver application overview shown in Figure 3.4. describes the process of the driver
application. The driver will sign up, the API’s of web server will save the data in database.
While in sign in the API’s get the data from database and will check the information. Either
the information is right or wrong. If information is right, the application will open and map
will automatically take location and update in database through web server.

14
F IGURE 3.4 : DRIVER APPLICATION O VERVIEW
3.1.4 Definitions and Acronyms
• API – Application Program Interface (is a set of routines, protocols, and tools for building
software applications.)
• GPS – Global Positioning System (a worldwide radio-navigation system formed from a
constellation of 24 satellites and their ground stations)
• Task – One step or piece of a workflow
• User – Any person who uses the user/passenger application
• Driver – Any person who has a registered car with a company

3.2 Design Considerations


3.2.1 Assumptions
The assumption of our project is, it will run worldwide and extreme amount of people will use
this application. Because usually if we see mostly peoples have android cell phones. So, as our
project is also in android. This system will help passenger to ride in secure environment.

15
3.2.2 Constraints
Platform

• User & Driver must have Android Phone

Operating System

• Android Kit Kat 4.4.4 or higher


• GPS must on
• Location must be set to high accuracy
• Internet(3G/4G) must be available

3.2.3 Risks and Volatile Areas


• In some areas internet is not available so application will not work
• If location is not set to high accuracy, it will be difficult to pick passengers/users

3.3 Architecture
The system architecture is given below in Figure 3.5. Which describe the whole process of the
application. The user will connect to server through customize API’s and will update the location every
second in database. On the other side the driver location is updating.

F IGURE 3.5 : ARCHITECTURE DIAGRAM


3.3.1 Overview
In order to ride now, first User will login/signup account using main window. Then User will
send its location using customized API to the Web Server [7].then server will update location
of user into database using Web Server same for driver then the location is sent back to
user/Passenger from the database. Driver will then pick up user and drop off on user choice.

3.3.2 Module
Our system consists of following main modules.

• User Application
o Login
o Ride Now
o Ride Later

16
o Registration
• Driver Application
o Login
o Registration
o Ride Oder view
• Admin Panel
o Monitoring
o View/Add/Edit/Delete
o Live View
• Database
• Webserver

3.4 Database Schema


Following is the structure of database schema which describe the tables and entities in database. There
are 10 tables in our project. “Users” table is our main table. In which both driver and passenger
information will add and retrieve. Then from this table the peoples can sign in. Then the “user’s
location” table which store the user location. Picks latitude and longitude and store it in database. Then
“Driver Location” which keeps record of the driver location. Then “Taxi info” keeps record of the taxi
model, registration numbers, color etc. basically “Taxi info” table is related to admin panel. And also,
the others table is working respectively

F IGURE 3.6: ERD

17
3.4.1 Tables
• Users
• Users_Location
• Drivers_Location
• Taxi_Information
• Awaiting_Confirm
• Rides
• Taxi_Status
• Request_status
• User_Roles

3.5 Work Flow Diagram


Following is the work flow diagram of our application. In which we define each and every step-in
detail. Which make it easy to know about this application for the reader.

F IGURE 3.7 : W ORK FLOW DIAGRAM

18
3.6 High Level Design
The overall view of the system is basically shown in the figure 3.8. In this project, the user asked for
ride. The application will send its location to database then the user application will automatically send
the notification to the nearest taxi.

F IGURE 3.8 : S YSTEM ARCHITECTURE


3.7 Low Level Design
Low level design describes the logic and construction behinds the activities from which the application
is developed. Here we have much diagrams i.e. Use case diagram, Sequence diagram, Activity diagram
etc.

3.7.1 Use Case Diagram


In use case diagram shown in Figure 3.9, we shown the works of each users in the applications.
That who can interact the specific role in the application. Here we define Users, Drivers, and
Admin

19
F IGURE 3.9 : USE CASE DIAGRAM
Figure 3.10 shows us the Activity diagram of our project. Which shows how the activities do
their activity. The first activity can request for sign up or for sign in. server give them
authentication. Then client search for ride and send request to the nearest taxi cab. The driver
needs to bypass the sign in or sign up steps. Then driver activity receives the notification and
give response to the client.

F IGURE 3.10 : ACTIVITY DIAGRAM

20
3.7.2 Sequence Diagram
Figure 3.11 is one of the sequence diagram of our project.

F IGURE 3.11 : SEQUENCE DIAGRAM


3.8 User Interface Design
In android, the user interface design is the most important role in application. Because each activity
has its layout. And layout makes from different designs. Here we made this project for android and try
our level best to make simple and smart interface. From which user can understood easily. This section
having detail of the full application interface.

3.8.1 Application Controls


The controlling part of this application is the navigation bar where every fragment is call and
open the fragment activity. If you need to see the nearest taxi on the map you will click on
Home navigation menu. Then it the clients wants to check the ride information. For ride
information, he would have to like on ride now navigation bar. And if user wants to edit his
profile. They should click on account menu bar.

21
F IGURE 3.12 : APPLICATION CONTROLS
The application controls are shown in the figure 3.12. Those controls are present in user’s
application. Different buttons are used to shift between different screens.

3.8.2 Screenshots
In this section, we provide the whole screen shot of our Project.

3.8.2.1 Sign in/ Sign up Activity of User and Driver Applications


3.8.2.2 Client panel

F IGURE 3.13: S IGN IN/ S IGN UP ACTIVITY USER APPLICATION


Using figure 3.13, User/passenger can login to application and also navigate to create account.
Different checks are applied on text fields. Empty text boxes are not allowed also wrong user
name and password will show different colors around text fields.

22
3.8.2.3 Driver Panel

F IGURE 3.14 : DRIVER APPLICATION


Using the figure 3.14. Driver can login to application and also navigate to create account.
Different checks are applied on text fields. Empty text boxes are not allowed also wrong user
name and password will show different colors around text fields.

3.8.2.4 First Activity after Sign in


If sign in information is correct. The app will enter in the following figure 3.15.

3.8.2.5 Client panel

F IGURE 3.15 : F IRST ACTIVITY AFTER SIGN IN


The application controls are shown in this figure. Those controls are present in user’s
application. Different buttons are used to shift between different screens.

23
3.8.2.6 Driver panel

F IGURE 3.16 : RIDE CARD


In Figure 3.16, Driver can login to application and also navigate to create account. Different
checks are applied on text fields. Empty text boxes are not allowed also wrong user name and
password will show different colors around text fields.

3.8.2.7 Admin Panel

F IGURE 3.17 : ADMIN F IRST P AGE


The Figure 3.17 shows the interface of the admin panel. When driver signup to the application.
The name of the driver will automatically reach in the spinner. Then after verification and
policy conformation admin will assign the car.

24
3.8.2.8 Clicking in Home navigation bar
3.8.2.9 Client Panel
Figure 3.18 shows us the interface of the user app. Where user will see the taxies around him.

F IGURE 3.18 : CLICKING IN H OME NAVIGATION BAR


This is main screen where all idle taxi drivers’ location will be published. User/Passenger can
easily select any of that taxi and take a ride.

3.8.2.10 Driver Panel


Figure 3.19 shows us the Driver interface where they can receive the order of the client. The
interface automatically picks the location of the taxi and update it in the database.

F IGURE 3.19 : CLICKING IN H OME NAVIGATION BAR (DRIVER PANEL )

25
3.8.2.11 After Clicking Ride Now Button on User Application
Figure 3.20 shows the Ride Now Fragment. Where the user interface will push the button and
request will send to the nearest taxi. Form their location. Click on the driver marker will show
the estimate time with estimate distance

F IGURE 3.20 : RIDE NOW B UTTON ACTIVITY


3.8.2.12 After Pressing Rasha Kana Button
Notification automatically generates to the nearest taxi. Following are the list order of both
driver and passenger panel;

3.8.2.13 Client Panel


Figure 3.21 show the Order card of the client application. When user push the “Let’s go
“button the application will automatically pick the information of the taxi driver and will show

F IGURE 3.21 : RIDE NOW NOTIFICATION TO DRIVER

26
3.8.2.14 Driver Panel
Figure 3.22 show the Received order card from the client. When the driver receives the
notification from client the whole information will came from database and will show in the
user request order card with the information of the passenger.

F IGURE 3.22 : DRIVER CARD VIEW OF O RDERS


3.8.2.15 Driver Options
Figure 3.23 shows the commands of the Driver panel. Either he can send the notification to
client that he in in Route means he is coming. Or he may can reject the request of the client.
Then after the destination reached the Accepted will end the journey and save the information
in database.

27
F IGURE 3.23 : DRIVER OPTIONS
3.8.2.16 Location through GPS
Figure 3.24 shows the interface of the Google map which will automatically pick the location
of the both driver and user. And will tell you the path to reach the destination.

F IGURE 3.24 : LOCATION


3.8.2.17 Now admin Panel
Figure 3.25 shows the interface of the total record of the vehicles belongs to the company

28
F IGURE 3.25 : ADMIN F IRST P AGE VEHICLE VIEW
3.8.2.18 Drivers list (add/delete/update)
Figure 3.26 shows the interface on which the admin can search/delete/update the driver
information.

F IGURE 3.26 : DRIVERS LIST ( ADD/ DELETE/UPDATE)

29
3.8.2.19 History of Rides
Figure 3.27 shows the record of total rides.

F IGURE 3.27 : H ISTORY OF RIDES


3.8.2.20 Records of the Passengers
Figure 3.28 shows the passenger record from database.

F IGURE 3.28 : RECORDS OF THE P ASSENGERS


3.8.2.21 Notification for offers to both client and driver
Figure 3.29 shows the Notification page where the work of this page is to send the notification
to the specific or to all user of this application.

30
F IGURE 3.29 : NOTIFICATION FOR OFFERS TO BOTH CLIENT AND DRIVER
3.8.2.22 Location of the peoples related to the application
Figure 3.30 shows the interface of the map fragment. Map fragment is designed in web where
the work of this fragment is to show the locations of the user and drivers both.

F IGURE 3.30 : LOCATION OF THE P EOPLES RELATED TO THE A PPLICATION


3.9 Summary
In this chapter, we provided the whole graphical representation of our application step wisely. Project
deliberation, conventions and menaces debated here. We structure wise described the whole graphical
design of our project in this chapter.

31
Chapter 4 Implementation
4.1 Discussion
This was the idea for the passengers to ride in the best cab reservation system which should be less time
taker and a secure system. From the current applications, we derived that there are lot of functionality
they remain and do not give the proper function to the passengers. That is the reason that majority of
passengers are finding taxi physically.

In Pakistan, most of the taxi company like “UBER”, they have the system which just pick the passenger
through GPS. They haven’t any functionality like shortest path, nearest taxi to passenger, no security
system was there. We came up with an idea that we should make a unique application must have the
upper functionalities. In which Passengers and drivers of one area communicates with each other
through Internet and GPS. Due to communication, they are available to see the information of drivers.
Then we discussed that, if a passenger came from other city or country how will he find a taxi route
also he may be even does not know about the destination place also not know about the taxi rent? For
this purpose, we provide a system which having the map for passenger to see the route and nearest taxi
on his area. Also, we added the fixed price per kilometer. So that makes really easily for the foreign to
use this service without any doubt and fear. Also, through admin panel admin can check the rating of
driver.

4.2 Development Methodologies


For developing this application, we tried many different methodologies. Some of them give accurate
result and some are failed to give accurate result. The following are the methodologies through which
our application is made

4.2.1 Web Server


For making this application, first we needed to make a web server through which the
information Insert/Edit/Update/Delete into the database. As we don’t work on webserver
before. We search for “Jersey REST Service and Send JSON Data from Java Client” [2] and
Restful [3]. We face much difficulties to make the web service.

The important problem in this phase is that we tried to run apache server but every time there
were error of Tomcat 8.0 Apache server [4]. Then we take helps from our supervisor and fixed
that issue.

4.2.2 Cloud Database


We search online clouds to keep our database. Such as, Amazon Web Services [5], Microsoft
Azure [6]. But there are some problems which is written down.

Microsoft Azure is the online cloud database. The problem of Azure is its really expensive. Its
subscription is 200 US dollars as we are student so we can’t afford its cost so for solution of

33
this problem. Our supervisor told us to use localhost “PHPMYADMIN”.so the database of this
application implements in Wamp server such as “phpmyadmin”.

4.2.3 Custom API


In order to get the nearest taxi. We develop our custom APIs using Java, android language and
deploy it to the server using eclipse and tomcat apache server. Because the easy APIs response
time is really slow. It why we use the custom APIs. We put formula to find the nearest taxi to
the passenger location in API. Also, put the google Map API to find the locations. For client
side, we use GET: API receive the request and from JSON give the response. Then the API will
POST time to the client to reach the driver in the time.

4.2.4 Nearest Location


For finding the nearest location of taxi near to the passenger. We put the algorithm which will
take the longitude and latitude location of client and driver and the algorithm will automatically
getup the locations of taxi. And then that algorithm will find the nearest taxi. And will give
notification to picking the client or passenger.

4.3 Implementation Tools and Technologies


We use the following tools and technologies for making this application.

4.3.1 Android Studio


As this application is based on android. So, for that purpose we use Android Studio 2.3.3 and
the android version is KitKat 4.4.

F IGURE 4.1 : ANDROID STUDIO

34
4.3.2 Eclipse
Eclipse is use for making the web server. In this application, Eclipse is used for making custom
api’s. which will add and retrieve the data in database.

F IGURE 4.2 : ECLIPSE


4.3.3 Bootstrapping
Admin panel is made in bootstraps. We use html and CSS for frontend and php for the database
connectivity.

4.3.4 Apache Tomcat server


Apache Tomcat 8.0 [8] is used in this application for online communication of the drivers,
clients and admin panels.

F IGURE 4.3 : APACHE TOMCAT SERVER


4.4 Summary
In this chapter, we written about the implementation of the both platforms. Both platforms use database,
but android and web platforms are used to build this application. Procedures tell which are the methods,
rules and procedures used to help this application get its shape.

35
Chapter 5 Testing

36
5.1 Testing Techniques
As we know that software testing is the most important phase for the software. After finalizing software,
testing make it reliable and make it ready to publish in open source. Testing is used to finds the bugs
and also tell us the overall working and responses of the software. To test our application, we use many
techniques and that are the following.

5.1.1 Black Box Testing


Black box testing is use to check output of each functional points of the software without
checking any internal code of software. For testing the application, we provide the necessary
input to the application, after that we detected and check the output of the test.

5.1.2 Unit Testing


The unit test provides the result of different parts of the software are check each part
individually. The objective of this checking is to find any error in separate activities. Our most
important part of the project is to check the Fragments used in the project, customized and
restful API’s, web server, website panel, wamp, phpmyadmin connection and overall activities
separately.

5.1.3 Integration Testing


After Unit test, it is very important to test the software after connecting each segment.
Sometimes software modules work properly when they are individual, but produce bug after
assembling with another segment. We have find those sorts of bugs through debugging in
Mobile phones.

5.1.4 System Testing


The system testing take place to check the desired output or result. We check our application
with the help of mobile phones and emulators blue stack and leproid to find out the bugs and
factors which make disturbance in the application performance.

5.2 Test Cases


The following are the result of the upper tests. For finding the test result we use mobile phone and
laptop.

37
5.2.1 Test Case 1
TEST CASE # 1
Module Name Verified Login
Test Priority High
No. Inputs Result which was expected Pass/ Failed
1 User Email Address Give Email address of the Passed
user/driver/admin
2 Password checker Check the password Passed
3 Push Login Button Search the data in database Passed
4 Check (If data meets) Go to Main Activity Passed

Check (If data not meet) Show Dialog box (Email Passed
Address/password are invalid)
TABLE 5.1 : T EST CASE 1
5.2.2 Test Case 2
Test case # 2
Activity Name Map Activity
Test Priority High
No. Inputs Result which was expected Pass/ Failed
1 Clicking sign in Button Go to Main Activity Passed
2 Home Fragment click Open the map fragment Passed
3 My Ride Fragment click Open the Order report Passed
4 Account Fragment click Open the logout fragment/ Passed
update account fragment
TABLE 5.2 : T EST CASE 2
5.2.3 Test Case 3
Test case # 3
Activity Name Map Fragment pick the location and update in database
Test Priority High
No. Inputs Result which was expected Pass/ Failed
1 Open the Home Show the Map Passed
fragment
2 Location pick Zoom to my location Passed
3 Get the location and Automatically get the location Passed
insert in database and paste it in the database
4 Update location each sec Update the location each sec Passed

38
TABLE 5.3: T EST CASE 3
5.2.4 Test Case 4
Test case # 4
Activity Name User request for the Ride
Test Priority High
No. Inputs Result which was expected Pass/ Failed
1 Ride now Button Notification sends to nearest Passed
Driver
2 Answer of Driver Client Receive Notification Passed
3 In route, rejected, Client receive Notification of Passed
accepted the input given by Driver
4 GPS location Show Location on map Passed
TABLE 5.4 : T EST CASE 4
5.2.5 Test Case 5.
Test case # 5
Activity Name Generate the Report
Test Priority High
No. Inputs Result which was expected Pass/ Failed
1 Click let’s go Notification sends to Passed
nearest Driver
2 Report When open the Ride Passed
Request. pick the
information of the taxi
driver
3 Adjust the data in Taxi information Data Passed
specific fields automatically set in the
field
4 Pick the total Pick the information from Passed
information database
TABLE 5.5 : T EST CASE 5

39
5.2.6 Test Case 6
Test case # 6
Activity Name Driver hand receive the notification of Ride request
Test Priority High
No. Inputs Result which was expected Pass/ Failed
1 Driver notification Came notification of the top Passed
of the mobile in driver app
2 Driver Report See the information of the Passed
user in report card
3 Driver Response Driver selected the response Passed
and send it through button
4 User receive the User receive the notification Passed
notification of the response of the driver
TABLE 5.6 : TEST CASE 6
5.2.7 Test Case 7
Test case # 7
Activity Name Driver hand receive the notification of Ride request
Test Priority High
No. Inputs Result which was expected Pass/ Failed
1 Pick location from app Open google map and pick Passed
the location of the both driver
and user
2 Show direction Google map show the Passed
direction and desired
destination
3 Reached destination Click on Accept and data will Passed
store in database
TABLE 5.7 : T EST CASE 7
5.3 Summary
In this chapter, we told about the testing of the application. As we know that testing session is the most
important part of making a good application. So, we derived the full testing in this chapter, which give
us absolute result. We take 4 types of test here. Which is written above. And all test gives absolute result
as desired.

40
Chapter 6 Conclusions and Future Work

41
6.1 Contributions
All member of the team contributed equally in this project. We divided the project in all members.
Tasks were given to those who were good in that particular area. As the members know about the
platform, each team member knows the platform which we worked on. So, for that every member
contribute well to make this project also the thesis documents. The working of android and webserver
is done by Jehangir Khan and Amir Khan. The work which is related to website done by Suleiman Khan
and Fazllullah. Also, each member tries their best to help in designing. When there was any difficulty
or problem every member came to help and contributed as their best.

6.2 Findings
As you all know our project is not researched based. In starting phase, we faced very difficulties because
the requirements were not clear. But in time, step by step we collect much information about to make
this project. There were many things which we had little knowledge in start, like to know about
webserver, how the data will be stored or retrieved from database online [10]. Then we know about
customized API’s, after that the location update. There were lot of information we find and make it
perfectly.

6.3 Future Improvements in the existing System


In future we can add fixed price plan per kilometer. When passenger ride on taxi and reached to
destination the application automatically generates the payment bill and send the notification to
passenger to pay the bill amount as per kilometer. Furthermore, we can also add the choice of payment
through credit card. For batter security purpose in future we can take help from NADRA to verify the
CNIC of each passenger and taxi driver.

42
References

[1] T. Kalanick, "Uber (company)," 2009. [Online]. Available: https://www.uber.com/en-PK/our-


story/.

[2] "TaxiCaller Nordic AB," 2016. [Online]. Available: http://www.taxicaller.com/.

[3] "Create Very Simple Jersey REST Service and Send JSON Data From Java Client," 6 6 2016.
[Online]. Available: https://crunchify.com/create-very-simple-jersey-rest-service-and-send-json-
data-from-java-client/.

[4] "Android Restful Web Service Tutorial," [Online]. Available:


https://www.javatpoint.com/android-web-service.

[5] "Location Strategies," [Online]. Available:


https://developer.android.com/guide/topics/location/strategies.html.

[6] "How to get and use location data in your Android app," [Online]. Available:
https://www.androidauthority.com/get-use-location-data-android-app-625012/.

[7] "Wamp Apachi Server," [Online]. Available: https://httpd.apache.org/.

[8] "Apache Tomcat 8 Configuration Reference," 28 3 2017. [Online]. Available:


https://tomcat.apache.org/tomcat-8.0-doc/config/http.html.

[9] "Start Building on AWS Today," [Online]. Available: https://aws.amazon.com/.

[10] "Microsoft Azure," [Online]. Available: https://azure.microsoft.com/en-us/.

[11] "Firebase helps you build better mobile apps and grow your business," [Online]. Available:
https://firebase.google.com/.

43
Appendices

44
Appendix A: Screenshots
In this chapter we will show you the design layouts of out application.

Figure 8. 1: Admin Sign in

Figure 8. 2 Admin Record Panel

45
Figure 8. 3: Account Panel

Figure 8. 4: Ride Rater

46
Figure 8. 5: Sign In Account panel

Figure 8. 6 Time Set for Ride later

47
Appendices B: Plagiarism Report

Get It On Demand
by 18025 jehangir khan

Submission date: 31-Jan-2018 04:07PM (UTC+0500)


Submission ID: 834252945
File name: with_out_titles_plagarisum_check.docx (3.55M)
Word count: 7117
Character count: 35651

48