FYP Part 2 Complete Report
FYP Part 2 Complete Report
FYP Part 2 Complete Report
Supervised By
Mr. Qamar Mahmood
Spring 2019
BS Computer Science
i
DECLARATION
We, hereby, declare that “No portion of the work referred to, in this project has been submitted in
support of an application for another degree or qualification of this or any other university/institute or
other institution of learning”. It is further declared that this undergraduate project, neither as a whole
nor as a part there of has been copied out from any sources, wherever references have been provided.
MEMBERS’ SIGNATURES
ii
TABLE OF CONTENTS
Chapter 1 .............................................................................................................................................. 6
Introduction ........................................................................................................................................... 6
1.1. Project Introduction ................................................................................................................... 6
1.2 Existing Examples / Solutions ................................................................................................. 6
1.2.1 Carpool ........................................................................................................................................ 6
1.2.2 NextCar........................................................................................................................................ 8
1.2.3 Careem ........................................................................................................................................ 9
1.2.4 Uber ........................................................................................................................................... 12
1.2.5 Comparison of Proposed System with Existing Solutions .......................................................... 14
1.3. Business Scope .................................................................................................................. 15
1.4. Useful Tools and Technologies .......................................................................................... 15
1.5. Project Work Break Down and Software Architecture ........................................................ 16
1.6. Project Time Line ................................................................................................................ 18
Chapter 2 ............................................................................................................................................ 20
2. Requirement Specification and Analysis ......................................................................................... 20
2.1. Requirement Specification ....................................................................................................... 20
2.2. Functional Requirements ......................................................................................................... 20
2.3. Non-Functional Requirements .................................................................................................. 22
2.3. System Use Case Modeling ..................................................................................................... 23
2.4. System Sequence diagrams .................................................................................................... 32
2.5. Domain Model .......................................................................................................................... 38
Chapter 3 ............................................................................................................................................ 39
System Design.................................................................................................................................... 39
3.1. Software Architecture ............................................................................................................... 39
3.3 Class Diagram ........................................................................................................................... 43
3.4 Sequence Diagram ................................................................................................................... 45
3.5 Entity Relationship Diagram ...................................................................................................... 57
3.5.1 Database Schema .................................................................................................................. 58
iii
3.6 User Interface Design................................................................................................................ 59
Chapter 4 ............................................................................................................................................ 61
Software Development ....................................................................................................................... 61
4.1. Coding Standards .................................................................................................................... 61
4.2. Development Environment ....................................................................................................... 62
4.3. Software Description ................................................................................................................ 62
Chapter 5 ............................................................................................................................................ 65
5.2.1. Monkey:................................................................................................................................. 65
Chapter 6 ........................................................................................................................ 4
6.1. Installation / Deployment Process Description ......................................................... 4
iv
List Of Tables
Table 3.1 40
v
Chapter 1
Introduction
This chapter provides a brief summary of project scope, project specification, a comparison study with the
available existing solutions and existing tools and technologies may be used for the development of this project.
This chapter also includes a project work breakdown structure and a proposed timeline.
Everyone wants to travel comfortably without having to pay much. With the emerging costs of petrol and gas
most people have resorted to travelling on the public transport. The public transports in our country provide a
very discomforting travel experience overall. We are planning to design an application through which people can
share their ride with other people provided that they share the same schedule and live near each other. Once the
user installs our application, they would have to register and provide details; such as timetable, location and if
they are a vehicle owner or a client. Afterwards the user will be shown other users having similar profile and they
can contact each other for sharing the ride.
There are many possible scenarios in which two or more people maybe living in the same vicinity and going to
the same place at same time to run their errands without knowing that they share the same ride schedule. For
instance, there are many offices in same locality and almost all the offices have working hours from 9 to 5. So if
two people are living in the same vicinity and going to different offices which are located at the same place they
can share their ride. Another example could be students going to the same university in different departments
without knowing the fact that another nearby student of the same university has the same timetable. Therefore,
we believe that this application could be really helpful for the people who want to cut down their budget of
transport and travel comfortably at the same time.
Carpool is web-based application. Below are the screenshots of the details a user needs to provide to search for
another transporter who is going to the same destination.
Figure 1.1 shows the information gathering page of a registered user on the web-based application Carpool
6
Figure 1.1 Information Gathering of a Registered User
7
Figure 1.2 Getting Daily Basis Schedule of User
Figure 1.3 shows a form getting the contact information of the user
Features
1. Allows the client to give their detailed information so that best match could be
selected for rider
2. User can mark a specific period of time on the calendar and enter their daily
schedule and the rider is allocated according to that schedule if available.
1.2.2 NextCar
NextCar is another ride sharing application in Pakistan. It has a web version as well as android version. Below
are the screenshots of the website and android version of the application.
Figure 1.4 shows that in the “Next” application attempting to register a new account generates an error message.
8
Figure 1.4 SignUp Activity is Broken
We were unable to try the application because it crashed, therefore we were unable to mention any features of
this application. We also viewed the user reviews on google play app store in which the users had given this
application negative remarks.
1.2.3 Careem
Careem is an android based application. Basically, Careem is not a ride sharing application, it comes in the
category of online cab booking. But since it has a similar functionality such as charging a client for dropping them
off at a particular place we decided to include this app in the comparison.
Below are the screenshots that depicts the basic working of the application. Figure 5 shows that the user can
selects their pickup location as their current location or chose another location for pickup and enter their drop off
location through map.
9
Figure 1.5 Drop Off Location Activity
Figure 1.6 shows that after tapping "Confirm pickup" the app searches for the nearest driver and connects him
to the user
10
Figure 1.6 Confirm PickUp Activity
Features
11
1.2.4 Uber
Uber is an android based application. Basically, Uber is not a ride sharing application, it comes in the category of
online cab booking. But since it has a similar functionality such as charging a client for dropping them off at a
particular place we decided to include this app in the comparison. Below are the screenshots that depicts the basic
working of the application. Figure 7 shows that user can give rating to the last trip he had
12
Figure 1.8 Confirm Ride Activity
Features
13
1.2.5 Comparison of Proposed System with Existing Solutions
Table 1 shows the Comparison between the four applications discussed above and the proposed system.
Initial two rows represent Vehicle owner to client sharing that is a module which lets a vehicle owner to share
his ride with a non-vehicle owner. And it also represents Vehicle owner to vehicle owner ride sharing that is a
module which lets a vehicle owner to share rides with another vehicle owner, the app will not restrict a vehicle
owner to be the one driving every time.
Vehicle owner
3 to vehicle ✓
owner ride
sharing
4 User feedback
✓ ✓ ✓
Schedule
5 based ride ✓ ✓
sharing
Client
6 registration ✓ ✓ ✓ ✓ ✓
Owner
7 registration
✓ ✓ ✓ ✓ ✓
Option for
8. saving pickup ✓
location
14
Multiple clients
9 sharing one ✓
ride
After the success of cab applications, people have become aware of the fact that there is a possibility of the
existence of a mobile application through which rides can be booked. Therefore, we have decided to further
extend the idea to minimize an individual’s cost even more by creating a ride sharing application.
The application saves money for the vehicle owner as well as the ride sharer. The vehicle owner can share the
fare with the ride sharer. This will be beneficial for the ride sharer as it would still be cheaper than any cab service.
In this way a person who owns multiple cars can hire drivers and earn some money on the side too by driving
clients to their destinations.
Unlike any cab application this application saves more money for the driver because they have to go to that
particular destination regardless of the fact that they can get any sharer or not, but in a cab application the driver
only has to drop the client at a particular destination and then the return journey comes out of their own pocket.
In this project we will be using java as our language since android applications can be developed on java. The
tools that we plan to use in this project are:
SQLite Browser is used to view your databases that you create within Android
Studio.
15
Visual Studio amongst other can be used to create a web API using C#
The project break down structure show the complete project divided into sub tasks and given each subtasks to
different members.
16
Figure 1.10
17
1.6. Project Time Line
Figure 1.11 shows the project timeline for Part-1. M1 is used to denote Vehicle owner to ride
sharer module
18
Figure 1.12 Project Timeline part-2
19
Chapter 2
2. Requirement Specification and Analysis
This chapter will discuss the requirement specifications of the software. In this chapter functional, non-
functional requirements, use cases, use case descriptions, and system sequence diagrams are presented to
specify the requirements of the software.
20
Module S. No Functional Requirement Type Status
Ride sharer 1 The ride sharer can sign up as ride sharer. Core Implemented
4 The ride sharer can view the available schedules Core Implemented
of vehicle owners.
Vehicle owner 5 The vehicle owner can sign up as vehicle owner Core Implemented
9 The vehicle owner can ride with other Vehicle Core Implemented
Owners.
10 The vehicle owner can ride with other ride Core Implemented
sharers.
11 The vehicle owner can chat with ride sharer that Core Implemented
are sharing same schedule.
12 The vehicle owner can chat with ride sharers Core Implemented
that are sharing the same schedule.
System 13 System will calculate and generate fare and its Core Implemented
Requirement distribution.
Table 2.1 Functional Requirements
21
2.3. Non-Functional Requirements
Non-functional requirements may specify some constraints that how a specific or set of functionalities should
be achieved for the software.
22
2.3. System Use Case Modeling
Use case is set of activities performed by an actor on system to get some results. Use case documents the all
possible ways a system can be used. System sequence diagram is documentation of set of events to occur while
interacting with the system.
The above figure shows the System UseCase Diagram , that represents the functionality of the whole system
by actors ( Ride Sharer and Vehicle Owner).
23
Figure 2.2 Vehicle Owner UseCase Diagram
The above figure shows the Vehicle Owner UseCase Diagram , that represents the functionality of Vehicle
Owner
24
Figure 2.3 Ride Sharer UseCase Diagram
The above figure shows the RideSharer UseCase Diagram , that represents the functionality of RideSharer.
25
Use Case 1: SignUp:
Description: The Ride Sharer and the Vehicle owner can sign Up by the first
time he /she used the system by providing a username, password,
mobile number and address.
Preconditions: Ride Sharer and the Vehicle owner provide username, password,
mobile number and address to signup and click on sign button.
Post conditions: Ride Sharer and the Vehicle owner will be signed up and will be
able to use the system.
Alternative Flows: Ride Sharer and the Vehicle owner cancels the current form.
26
2. The Ride Sharer and the Vehicle owner has not filled the
form correctly.
Description: Ride Sharer and Vehicle owner will Login into the system by
providing Username and password.
Preconditions: Ride Sharer and Vehicle owner provides username, password and
then click on the sign in button.
Post conditions: Ride Sharer and the Vehicle will be signed in to the system.
Alternative Flows: Ride Sharer and the Vehicle owner cancels the current form.
27
Exceptions: 1.The database is not responding.
2. The Ride Sharer and the Vehicle owner has not filled the
form correctly.
Description: Ride Sharer and Vehicle owner can upload their weekly schedules.
Post conditions: The schedule of Ride Sharer and the Vehicle owner will be
successfully uploaded into the app.
28
Use Case4: Ride:
Description: Vehicle owner can ride with the Ride sharer or with the Vehicle
Owner as well.
Post conditions: Vehicle owner will select from the different schedules to take a
ride with the matching schedule’s person.
Alternative Flows: Vehicle owner/ Ride Sharer keep the request partially complete.
29
Exceptions: 1. The system is not responding.
Description: Vehicle Owner, Ride Sharer can chat with other users that are
sharing same schedule. And he/she can chat with ride sharers.
30
Exceptions: 1. The system is not responding.
Description: Vehicle Owner and Ride Sharer can select from available
schedule.
Post conditions: The schedule of Ride Sharer and the Vehicle owner will be
successfully uploaded into the app.
31
Normal Flow: Vehicle Owner , Ride Sharer System
2.4.1 SignUp
32
The above figure shows the Sign-Up scenario for Vehicle Owner, the Vehicle Owner requests to sign up and the
system registers the Vehicle Owner successfully
The above figure 2.5 shows the Sign-Up scenario for RideShare, the Ride Sharer requests to sign up and the
system registers the Ride Sharer successfully
2.4.2 Login
33
Figure 2.6 System Sequence Diagram(Login)
The above figure shows the Login scenario for Ride Sharer, the actor requests to Login and the system logs in
the Ride Sharer successfully
The above figure shows the Login scenario for Vehicle Owner, the actor requests to Login and the system logs
in the Vehicle Owner successfully
34
Figure 2.8 System Sequence Diagram(Upload Schedule)
The above figure 2.8 shows the upload schedule scenario for Ride Sharer, the actor wants to upload his schedule
and the systems accepts the schedule of the Ride Sharer.
The above figure shows the upload schedule scenario for Vehicle Owner, the actor wants to upload his schedule
and the systems accepts the schedule of the Vehicle Owner.
2.4.4 Select from Available Schedule
The above figure shows the Select from available schedules scenario for Vehicle Owner, the actor wants to just
select from the available schedules and the system uploads that schedule for the Vehicle Owner.
2.4.5 Ride
36
The above figure shows the Ride scenario for Ride Sharer, the actor wants to Ride in a vehicle and the system
allows the Ride Sharer to take a ride.
The above figure shows the Ride scenario for Vehicle Owner, the actor wants to Ride in a vehicle and the
system allows the Vehicle Owner to take a ride.
2.4.6 Chat
The above figure shows the Chat scenario for Ride Sharer, the actor wants to chat with other users and the
system successfully sends the message.
The basic concepts o of our App that is shown in the following figure representing a domain model.
There are several classes in the domain model representing the conceptual model of the system .A class User have
several data members , i,e mobileNumber, name. Similarly VehicleOwner , RideSharer, Ride, Schedule and
feedback classes have their own data members.
Now these classes are associated with one another in the following way.
VehicleOwner and RideSharer are inheriting the data members of class User.
Similarly, one vehilceOwner is associated with multiple rides. Which means that a vehicle owner can
take multiple rides , he/she is not restricted to only one ride.
Schedule is associated with both, the rideSharer and the VehicleOwner which means that both the roles
must have to enter their schedules.
38
Figure 2.16 Domain Model
The above figure shows the Initial Conceptual Model of the System including the conceptual classes of the
whole system.
Chapter 3
System Design
In this chapter we explain architecture styles, architecture patterns and design pattern. For
architecture style we use Layered architecture style and MVC architecture pattern and singleton
design pattern.
Layer Description
39
Presentation Layer This layer will be used for the interaction with the user
through a graphical user interface.
Business Logic Layer This layer contains the business logic. All the
constraints and majority of the functions reside under
this layer.
Table 3.1
Presentation Layer:
Occupies the top level and displays information related to services available on our App. This tier
communicates with other tiers by sending results to the browser/Mobile Interface and other tiers.
Application Layer also called the middle tier, logic tier, business logic or logic tier, this tier is pulled
from the presentation tier. It controls application functionality by performing detailed processing.
Database Layer:
Database layer includes database servers where information is stored and retrieved. Data in this tier is kept
independent of application servers or business logic.
40
Figure 3.1 Architecture Diagram
The above architecture diagram shows the presentation layer in which mobile interface and web interfaces are
present. Below is the business logic is present where the modules of the app is shown. at the last the Database
layer is present for the preservation of the data. Below are the internal architecture diagrams of the modules
separately.
41
Figure 3.2 Module Vehicle Owner Architecture Diagram
Figure above shows the internal architecture of module vehicle owner where several work packages are present.
A work package is a task that is performed in a specific period of time that implements certain functionalities.
42
Figure 3.3 Module Ride Sharer Architecture Diagram
Figure above shows the internal architecture of module Ride Sharer where several work packages are present. A
work package is a task that is performed in a specific period of time that implements certain functionalities.
• Inheritance relationship has been defined i.e. the classes VehicleOwner and
RideSharer are inheriting the attributes and setters and getters of class User.
• Composition relationship has been defined b/w Vehicle Owner and Schedule.
Figure above shows the classes, their attributes, their functions and the relationship among them.
44
3.4 Sequence Diagram
Sequence Diagram model the flow of logic within your system in a visual manner enabling you both to
document and validate your logic, and are commonly used for both analysis and design purposes.
The below Sequence Diagram tells about the system flow of actions. Involved classes are VehicleOwner,
RideSharer, Schedule, Ride and User.
Figure above shows the SignIn scenario of Ride Sharer. The interaction between classes during the SignIn
process is shown in diagram.
45
Figure 3.6 Sequence Diagram(SignIn)
Figure above shows the SignIn scenario of Vehicle Owner. The interaction between classes during the SignIn
process is shown in diagram.
46
Figure 3.7 Sequence Diagram(SignUp)
Figure above shows the SignUp scenario of Ride Sharer. The interaction between classes during the SignUp
process is shown in diagram.
47
Figure 3.8 Sequence Diagram(SignUp)
Figure above shows the SignUp scenario of Vehicle Owner. The interaction between classes
during the SignUp process is shown in diagram.
48
Figure 3.9 Sequence Diagram(Upload Schedule)
Figure above shows the Upload Schedule scenario of Vehicle Owner. The interaction between
classes during the Upload Schedule process is shown in diagram.
49
Figure 3.10 Sequence Diagram(Upload Schedule)
Figure above shows the Upload Schedule scenario of RideSharer. The interaction between classes
during the Upload Schedule process is shown in diagram.
50
Figure 3.11 Sequence Diagram(Select from Available Schedule)
Figure above shows the select from available schedules scenario of Ride Sharer. The interaction
between classes during the select from available schedules process is shown in diagram.
51
Figure 3.12 Sequence Diagram(Select from Available Schedules)
Figure above shows the select from available schedules scenario of Vehicle Owner. The interaction between
classes during the select from available schedules process is shown in diagram.
52
Figure 3.13 Sequence Diagram(Chat)
Figure above shows the Chat of Vehicle Owner. The interaction between classes during the Chat process is
shown in diagram.
53
Figure 3.14 Sequence Diagram(Chat)
Figure above shows the Chat of Ride Sharer. The interaction between classes during the Chat process is shown
in diagram.
54
Figure 3.15 Sequence Diagram(Ride)
Figure above shows the Ride of Ride Sharer. The interaction between classes during the Ride process is shown
in diagram.
55
Figure 3.16 sequence Diagram(Ride)
Figure above shows the Ride of Vehicle Owner. The interaction between classes during the Ride process is
shown in diagram.
56
3.5 Entity Relationship Diagram
The entity-relationship model (or ER model) is a way of graphically representing the logical relationships of
entities (or objects) in order to create a database. An entity– relationship model (ER model) describes inter-
related things of interest in a specific domain of knowledge. An ER model is composed of entity types (which
classify the things of interest) and specifies relationships that can exist between instances of those entity types.
Figure above shows the logical data model, representing attributes and relationships among entities
57
3.5.1 Database Schema
A database schema represents the logical configuration of all or part of a relational database. It can exist both as
a visual representation and as a set of rules known as integrity constraints that govern a database.
.
Figure3.18 Database Schema
58
3.6 User Interface Design
User Interface (UI) Design focuses on anticipating what users might need to do and ensuring that the interface
has elements that are easy to access, understand, and use to facilitate those actions. UI brings together concepts
from interaction design, visual design, and information architecture.
59
Figure 3.20 Vehicle Owner SignUp Interface
60
Chapter 4
Software Development
This chapter will provide the details about the coding standard, we adopted during implementation phase.
The adopted coding standards are discussed in the following subsections. Indentation:
Four spaces are used as the unit of indentation. The indentation pattern should be consistently followed
throughout. Declaration:
One declaration per line is used to enhances the clarity of code. The order and position of declaration is as
follows:
• First the static/class variable is placed in the sequence: First public class variables,
protected,
• package/default level i.e. with no access modifier and then the private. As far as possible
static or class fields are explicitly instantiated.
• Instance variables are placed in the sequence: First public instance variables, protected,
• Class methods are grouped by functionality rather than by scope or accessibility to make
reading and understanding the code easier.
• Declarations for local variables are only at the beginning of blocks e.g. at the beginning of a
try/catch construct.
Statement Standards:
Each line contains at most one statement. While compound statements are statements that contain lists of
statements enclosed in braces. The enclosed statements are indented one more level than the compound
statement. The opening brace at the end of the line that begins the compound statement. The closing brace to
begin a line and be indented to the beginning of the compound statement. Braces are used around all
statements, even single statements, when they are part of a control structure, such as an if-else or for statement.
A Boolean expression / function is compared to a Boolean constant.
61
Naming Conventions:
Naming conventions make programs more understandable by making them easier to read. Following
conventions are followed while naming a class or a member:
• We used full English descriptors that accurately describe the variable, method or class. For
example, use of names like editTextCode, editTextCode instead of names like x1, y1, or fn.
• Terminology applicable to the domain is used. Implying that if user refers to clients as Ride
Sharer, then the term RideSharer is used for the class, not Client.
• Mixed case is used to make names readable with lower case letters in general capitalizing the
first letter of class names and interface names.
The reason for using android studio was that it provides a very interactive and easy to understand interface to
work with android devices. In this tool, User can test the written code on android device and that results in better
outcomes.
Few alternatives for android studio are AIDE (Android IDE), Application Craft, Basic4Android and Cordova.
62
Figure 4.1 Initialization Method
The figure 4.1 above shows that proper naming conventions have been followed in initializing the variables. As
It can be seen that variables have meaningful names such as verification_code and phone.
The figure 4.2 above depicts the verification method used in our signup class. The method name is set using
standard practices and the variables used inside the method also have meaningful names.
63
Figure 4.3 SignUp Method
The figure above shows the signup method in which the verification method is being called and the user gets
64
Chapter 5
Software Testing
This chapter provides a description about the adopted testing procedure. This includes the selected
testing methodology, test suite and the test results of the developed software.
Unit testing is a software testing method by which individual units of source code, sets of one or
more computer program modules together with associated control data, usage procedures, and
operating procedures, are tested to determine whether they are fit for use:
5.2.1. Monkey:
Monkey is a command line tool that runs over adb shell command line. It generates n number
of random events such as random touches, gestures, system level events, etc. and sends to the
system or app which you want to test.
65
Monkey performs following functionalities.
Steps to perform:
Description:
The table above depicts the test case for the signup of ride sharer in which we have taken a phone number of
“923070158856” to get a ride sharer signed up. And the test case passed successfully. The figure 5.1 below
shows the Monkey tool performing that test.
66
Figure 5.1 SignUp TestCase(Through Monkey Tool)
The figure 5.2 below shows the Monkey tool performing that test.
Software Deployment
For the deployment, we will provide user with the apk of android application. Apk is generate by process
described below
2. Now selected generate signed apk from Build section of android studio.
Figure 6.3 build a signed apk
3. Create key and store in system path also set password for future.
5. Apk generate.
After Generating apk place it in apk folder and create another folder for banners of two different size. Create
another folder named it source code and out source code of application in this folder and at last put screenshots
of different sizes in screenshot folder.
Now put all these folder in project name folder and deploy it suing play store.