Download as pdf or txt
Download as pdf or txt
You are on page 1of 70

Adama science and Technology University

School of Electrical Engineering and


Computing
Computing department
(Software Engineering) program

A senior project submitted for the partial fulfillment of degree


program at department of computing:

ADAMA CITY GUIDE MOBILE APPLICATION


By
Kaleb Girma
Mappy Mesfin
Kalkidan Mulugeta
Mahider Abebe
Hanna Abeje

Advisor: Endale Aragu


Date
Acknowledgment
With the deepest gratitude we wish to thank God and every person who has come to help us and
inspired us for the real coming of this project.

We would also like to acknowledge and express our gratitude to our advisor Mr. Endale Aragu
for his magnificent support and contributions by providing necessary template documents and
hand-outs for the project to go as planned.

Finally, a great appreciation to the university and the department that gave as the chance to
develop our computing skills.

ii
Table of Contents
List of Figures ........................................................................................................................ v
List of Tables ........................................................................................................................ vi
Chapter One......................................................................................................................... 1
1.1 Introduction ......................................................................................................................1
1.2 Background .......................................................................................................................1
1.3 Statement of the Problem ..................................................................................................3
1.4 Purpose of the project........................................................................................................4
1.5 Team composition .............................................................................................................4
1.6 Objectives of the project ....................................................................................................5
1.6.1 General Objective.................................................................................................................. 5
1.6.2 Specific Objectives ................................................................................................................ 5
1.7 Feasibility ..........................................................................................................................5
1.7.1 Technical feasibility .............................................................................................................. 5
1.7.2 Operational feasibility .......................................................................................................... 5
1.7.3 Economical Feasibility .......................................................................................................... 6
1.8 Scope and limitation ..........................................................................................................6
1.8.1 Scope ....................................................................................................................................... 6
1.8.2 Limitation............................................................................................................................... 6
1.9 Significance of the project ..................................................................................................7
1.10 Methodology .....................................................................................................................7
1.10.1 Interviewing....................................................................................................................... 7
1.10.2 Practical observation ........................................................................................................ 8
1.11 Development tools ............................................................................................................8
1.12 Testing procedure ..............................................................................................................9
1.12.1 Requirement testing .......................................................................................................... 9
1.12.2 Unit testing......................................................................................................................... 9
1.12.3 Integration testing ............................................................................................................. 9
1.13 Overview of Project Phases ................................................................................................9
1.14 Required resources with cost ........................................................................................... 10
1.15 Task and schedule ............................................................................................................ 11
Chapter Two ...................................................................................................................... 12
2 Description of the existing system ............................................................................... 12
2.1 Major function of the current system ............................................................................... 12
2.2 Users of the current system.............................................................................................. 13
2.3 Drawback of the current system ....................................................................................... 13
2.4 Business rule of the current system .................................................................................. 14
Chapter Three:................................................................................................................... 15
3 Proposed System ......................................................................................................... 15
3.1 Proposed system (Overall description of the proposed system) ......................................... 15
3.2 Functional requirement.................................................................................................... 15
3.3 Non-functional requirement............................................................................................. 17
3.4 Performance Requirements.............................................................................................. 17

iii
3.4.1 Performance consideration................................................................................................. 18
3.5 System model .................................................................................................................. 20
3.5.1 Scenario ................................................................................................................................ 20
3.5.2 Use case model ..................................................................................................................... 23
3.5.3 Use case description ............................................................................................................ 23
3.6 Object Model ................................................................................................................... 28
3.6.1 Data dictionary .................................................................................................................... 28
3.6.2 Class diagram ...................................................................................................................... 29
3.7 Dynamic model ................................................................................................................ 30
3.7.1 Sequence diagram ............................................................................................................... 30
3.7.2 Activity diagram .................................................................................................................. 35
3.7.3 State Diagram ...................................................................................................................... 38
3.7.4 User interface ....................................................................................................................... 40
Chapter Four ..................................................................................................................... 43
4 System Design ............................................................................................................. 43
4.1 Overview ......................................................................................................................... 43
4.1.1 Purpose of the system.......................................................................................................... 43
4.1.2 Design Goal .......................................................................................................................... 43
4.2 Proposed system architecture .......................................................................................... 45
4.2.1 Overview .............................................................................................................................. 45
4.2.2 System process ..................................................................................................................... 50
4.2.3 Request Processor ............................................................................................................... 51
4.2.4 Subsystem Decomposition .................................................................................................. 52
4.2.5 Hardware/ Software mapping ............................................................................................ 53
4.2.6 Persistent Data management .............................................................................................. 53
4.2.7 Component diagram ........................................................................................................... 56
4.2.8 Deployment diagram ........................................................................................................... 58
4.2.9 Boundary condition ............................................................................................................. 59
4.2.10 Database design ............................................................................................................... 61
4.2.11 Access controlling ........................................................................................................... 62
Reference .................................................................................................................................... 63

iv
List of Figures
Figure 1-0-1 Task and schedule .................................................................................................... 11
Figure 3-1 Use case model ............................................................................................................ 23
Figure 3-2 Class diagram .............................................................................................................. 29
Figure 3-3 Sequence diagram: Get my location ........................................................................... 30
Figure 3-4 Sequence diagram: Search .......................................................................................... 31
Figure 3-5 Sequence diagram: Browse category .......................................................................... 32
Figure 3-6 Sequence diagram: Browse map ................................................................................. 33
Figure 3-7 Sequence diagram: About ........................................................................................... 34
Figure 3-8 Activity diagram: Category browse ............................................................................ 35
Figure 3-9 Activity diagram: Search............................................................................................. 36
Figure 3-10 Activity diagram: About ........................................................................................... 37
Figure 3-11 Category browse state diagram ................................................................................. 38
Figure 3-12 Search state diagram ................................................................................................. 38
Figure 3-13 Description state diagram .......................................................................................... 39
Figure 3-14 get my location state diagram ................................................................................... 39
Figure 3-15 Interface: Home ......................................................................................................... 40
Figure 3-16 Interface: Menu ......................................................................................................... 41
Figure 3-17Interface: Category View ........................................................................................... 42
Figure 4-1 System Tire Architecture ............................................................................................ 45
Figure 4-2 General System Architecture ...................................................................................... 46
Figure 4-3 Client Server Communication ..................................................................................... 47
Figure 4-4 System process ............................................................................................................ 50
Figure 4-5 Request Processor ....................................................................................................... 51
Figure 4-6 Subsystem Decomposition Diagram ........................................................................... 52
Figure 4-7 Class to Table mapping ............................................................................................... 53
Figure 4-8 class to database table ................................................................................................. 53
Figure 4-9 LocalCategoryDatabase mapping ............................................................................... 54
Figure 4-10 SearchCategory mapping .......................................................................................... 54
Figure 4-11 GetRoute mapping .................................................................................................... 54
Figure 4-12 LocationManager mapping ....................................................................................... 55
Figure 4-13 CurrentLocation mapping ......................................................................................... 55
Figure 4-14 CategoryList mapping ............................................................................................... 55
Figure 4-15 Component Diagram ................................................................................................. 56
Figure 4-16 Hardware components ............................................................................................... 57
Figure 4-17 : Software Components ............................................................................................. 57
Figure 4-18 Deployment Diagram ................................................................................................ 58
Figure 4-19 Database Design ........................................................................................................ 61

v
List of Tables
Table 1-0-1 2007 E.C Statistics of services in Adama city ............................................................ 2
Table 1-0-2 Team composition ....................................................................................................... 4
Table 1-0-3 Development tools ...................................................................................................... 9
Table 1-0-4 Required resources with cost .................................................................................... 10
Table 2-1 Business rule of the current system .............................................................................. 14
Table 3-1 Map in Functional Requirements ................................................................................. 16
Table 3-2 Information Retrieval in Functional Requirements ...................................................... 16
Table 3-3 Non-Functional Requirements...................................................................................... 17
Table 3-4 search use case description ........................................................................................... 24
Table 3-5 browse service use case description ............................................................................. 24
Table 3-6 view description use case description........................................................................... 24
Table 3-7 get direction use case description ................................................................................. 25
Table 3-8 plot on map use case description .................................................................................. 25
Table 3-9 get location use case description .................................................................................. 26
Table 3-10 create service use case description ............................................................................. 26
Table 3-11 view service use case description ............................................................................... 26
Table 3-12 login use case description ........................................................................................... 27
Table 3-13 Data dictionary ........................................................................................................... 28
Table 4-1 Design Goal Priority ..................................................................................................... 44
Table 4-2 Design Goal Priority ..................................................................................................... 60
Table 4-3 Access control table ...................................................................................................... 62

vi
Acronyms
App-application
Os-operating system
E.C- Ethiopian calendar
ATM - Automated teller machine
GPS – Global position service
HTML- Hypertext markup language
Org –organization
Mac
SQL-structured query language
MS-Microsoft
Github
UI- User interface
Pkt - Packet
ID – Identification
SDK-software development kit
BR-Business rule
H- High
M- Medium
L- Low
i.e. - that is
e.g. – example
MB-megabyte
API - Application program interface
RAM- Random access memory
OS – Operating system
ATM- automated teller machine
GPS- global positioning system
UML- Unified Modeling Language
UI- user interface
POI- Point of interest
GSM- Global system for Mobile communication
GPRS- General Packet Radio Service
XML- extensible Markup Language
JSON- JavaScript Object Notation
HTTP- Hypertext Transfer Protocol
CPU- Central processing system
HW- Hardware
DB- Database

vii
Chapter One
1.1 Introduction

Today, people want to adapt their living environment to intelligent environment, which includes
a powerful infrastructure and some intelligent objects. People do their tasks through the
intelligent environment, it could be by using their smart phone apps. A mobile app is a computer
program designed to run on mobile devices such as smartphones and tablet computers.

A city guide system is an interactive and innovative navigation system for users requiring just a
standard mobile phone or handheld computer. With city guide apps users can select a city's
facilities and services purposefully from the complete spectrum offered.

Adama city guide system is a system that enable users to compose services and navigate
different locations that are located in Adama city or surrounding by themselves. The system
brings users in-depth and authentic or genuine guides to some of their favorite services around
the city. Also it provides essential information for the first-time visitor, frequent traveler, or
long-term resident with easy-to-use contact information.

Android platform or mobile opreting system has been chosen to implement this system.
Android is a mobile operating system (OS) currently developed by Google, based on the Linux
kernel and designed primarily for touchscreen mobile devices such as smart phones and tablets.
(wikipedia.org) The project is intended to explore the realization of city guide over Android.
When the application is completed it will be able to provide different functionality like listing in
category based on user preference, guide users to the locations requested and search and find
services.

1.2 Background
The term "Adama" was pointed to have originated from an Oromo word-"Adaamii". It is a name
for plant called "cactus" in English. According to local people, there were plenty of Adaamii
trees in and around old Adama areas. Later, when the settlement moved to the site around the
new railway station, the name Adama also came along with the people, since the settlers were the
same.

Adama, which has been the original name of the town, retained and or remained until it was
renamed "Nazareth" by Emperor Haile Selasse in 1944. However, recently after the
establishment of Regions during the transitional period, the Oromiya Regional State decided to
retain and restate some of the original names of places in the region. As a result, "Adama", the
original and historical name that is believed to preserve the interest and history of the Oromo was
reinstated.

The opening of Finfinne— Djibouti railway in 1917 was another impetus for the emergence of
Adama as an important commercial center. The beginning of the first settlement of indigenous

1
people to exchange goods and services with the railway workers was the embryo of the process
that later brought about the evolution of the area into the focal as an urban area.

Adama City is located at some 100 kilometers from Finfinne, on the southeast along the main
road to Harar. Its grid references point that the City stretches between 80 33' to 80 36' North
latitude and 390 11' 57" to 390 21' 15" East longitude.

Adama is a busy transportation and the leading city in Ethiopia in holding many conferences
making the city to provide lots of international hotels, big conference halls and much more
services. And some tourist sites like the statue of Aba Geda located in the middle of city or the
martyr's monument at Galmaa Abba Gadaa opening the skyline for the city.

Adama cultural and tourism office is located at Franco near the post office at the center of
Adama city. The organization was established in 2003. Though the organization offer and do a
lot of work. It focuses more on tourism and services found in the city. Besides giving tour to the
people it has other works like:

 Adama cultural and tourism resource studying


 Giving ranks for services that are located in the city
 Follow up and control this services
 Introduces companies to people

Some services that found in Adama city


Kinds of service diffrent servise with out there branch that found in the city
Cafteria 187
Hotel 142
Bed room 174
Night club 15
Hall 82
Cinima 4
Hospital 5
Bank 7
Factory 22
Bar and resturants 213
Butchery 5
Unvirstity and college 17
Table 1-0-1 2007 E.C Statistics of services in Adama city

2
The above information source is found from Adama cultural and trousim office and shows only
different services with out their branch.

The organization have a printed map of the city with detailed information that can used manually
to navigate through the city which is published in november 2007e.c. Information Guide is
focus on providing information like restaurants, bars, museums, movies, ATM, parking lots
and so on in the city. And the organization luck to have automated system to guide a visitor and
tourists through the city which makes it difficult for them to promote the city more.

1.3 Statement of the Problem

People, mostly tourists and visitors face with the difficulty of finding services they need to use or
they need to find. Which leads them for excessive cost, energy loss leading them for exhausted
and finally wasting their valuable time.

The current system that can be used to guide a user is only available in manual and it does not
provide enough location information and it’s hard to come by. Due to this reason the existing
manual processing has the following problems.

Cost Problem

 Leading the user for extra cost.


 Leading service providers for extra cost for the purpose of promotion.
Information

 Lack of location information and hard to keep it up-to-date since its paper based
 User might not get genuine guides information
Poor time management

 It takes exesisive time to find the a location on aprinted map compered to Adama city
guide system

Therefore, Adama city guide system is important to over come all the problems that are listed
above and with much more added features and services included in the system like users can
know where they are located and easy search and find functions.

3
1.4 Purpose of the project

 From individual perspective


o Help many users like visitors, tourists, and long-term resident to be able to navigate the
city with easy and simple Android mobile application.
o They get enough information about the services
 From city and service provider perspective
o The system allows a simple promotion method for service providers so that they can
promote their products.
o It will provide the city with more satisfied number of visitors and tourists.

1.5 Team composition

Team Composition
Name Responsibility Main Activity Other
Kaleb Girma Team Leader Coordinate and lead the Participate all
Members, Design, activity
Architecture,
implementation and
Documentation
Hanna Abeje Member Requirement Analysis, Participate all
Design, Architecture, activity
implementation and
Documentation
Kalkidan Mulugeta Secretary Requirement Analysis, Participate all
General Design, Architecture, activity
implementation and
Documentation
Mahider Abebe Secretary Requirement Analysis, Participate all
General Design, Architecture, activity
implementation and
Documentation
Mappy Mesfin Member Requirement Analysis, Participate all
Design, Architecture, activity
implementation and
Documentation
Table 1-0-2 Team composition

4
1.6 Objectives of the project
1.6.1 General Objective

The genral objective of this project is to design and develop a dynamic city guidance mobile
application system which allows the user to access the location, direction and contacts of the
city. It gives good services to new visitors in the city and allow them to get the chance to visit
places they would like to see.

1.6.2 Specific Objectives

 Develop a system that shows major services with their location and contacts in the city.
 Design and develop a database to store location and information of a certain place.
 Develop a mobile app that gives the path to the places they wanted to go.
 Develop a system that gives dynamically updated location information to the user.
 Allow the service providers to insert new notifications through the backend database
server.
 Develop an application that sorts the services in catagories.

1.7 Feasibility

The feasibility studies an evaluations and analysis of the potential of the project. Where
feasibility assessment unveils the economic, technical and operational areas. And risks that are
involved in the implementation of the project. The following are major feasibly concerns that a
business must be in clear light about.
1.7.1 Technical feasibility

Technical Feasibility study is about testing if the existing technology has a potential to develop
or unable to acquire the proposed system. Implementation of the proposed system will use and
run on Android smart phone operating system. Assuming required hardware and software
resources are available for the development and implementation of proposed system. Therefore
we can say the project is technically feasible.

1.7.2 Operational feasibility

Operational feasibility is a measure of how well a proposed system solves the problems, and
takes advantage of the opportunities identified during scope definition and how it satisfies the
requirements identified in the requirements analysis phase of system development.
 Process – Usually the main inputs from the users are simple and easy. So users and also
the system won’t have the difficulty of processing.
 Evaluation – The system will benefit anybody who uses it. There might be a miner
threat for tour guide services because users of this system might not need a tour guide.

5
 Implementation – implementation will be simple because all resource from inside and
outside will be available will low cost and miner energy. The project will affect how the
current system works; by current we mean the manual guidance system.
 Resistance – Since the system will be available only on android mobile operating system
other mobile phone operating system users won’t be able to run the system on their
devices. And the system will support only the English language and some peoples might
fine that difficult.
 Adaptation– Users won’t need much time to adapt the system because the system is
much user friendly and adaptable.

1.7.3 Economical Feasibility


Economic feasibility evaluates the cost of the system development against the ultimate income or
a benefit gets from the developed system. So the project is economically feasible because the
proposed system can uses software and hardware tools that are accessible by low cost with a
limited time.

Therefore the advantage of the system is it makes the city guide process affordable and time
saving with simple point-to-point direction and navigation.

1.8 Scope and limitation


1.8.1 Scope

 Help people to explore the city


 Provide location information of hotels, health centers, Hall, Banks, Petrol stations,
Stadium, Universities and colleges
 Giving direction to particular places,
 Give services via smart phone GPSs for direction
 Notify the user nearby recommendation based on their location. (optional)
 The application is implemented based on an open source map.
1.8.2 Limitation

 Some features of the application are dependent on internet connection so in order to get a
dynamic system we need to have an internet connection.
 Our system gives services only for Adama city only.
 This project might not include services like ATM, pharmacy, Parking, police station,
Church and mosque due to time limitation.

6
1.9 Significance of the project

Significances of this city guide System are:

 Minimizing the time wasted to find different services by tourists and other visitors.
 Providing information for users about the variety of services found in the city
 Promoting services for many service providers and also promoting the city and the
surroundings.
 Minimizing the cost for users that are egger to find service inside the city.
 Providing the user where they are currently located with their exact GPS location.
 Since Adama is the leading city in Ethiopia for conferences, the system will provide
information about Conference Halls that are located in the city.
 Minimizing workloads for the city’s cultural and tourism office.

1.10 Methodology
We have a limited time so we planned to use Agile software development methodology because
it helps us to test and find errors at the lower stage of development and it reduces risk and also
welcome changing requirements even at late in development. It also helps us deliver working
software frequently from a couple of weeks to a couple of months with a preference to the
shorter timescale. Also promotes the teams to meet several days in a week to discuss progress,
identify problems and plan the day’s activities with the goal being able to produce working
software as quickly as possible.

1.10.1 Interviewing
We’ve chosen interviewing technique because we think it is a good way to gather requirement
information for our project easily. The following are some of interviewees that we conducted:

 Ato Aman
Ato Aman is the administrator of Adama Administration office he give us basic information
about the city he told us the city don’t have any system that has been developed before that
help visitors and tourists to roam through the city. He suggested us to talk to Adama cultural
and tourism office for more information.

 Ato Temesgen Debela


Ato Temesgen Debela is the superviser in Adama cultural and tourism office.He told us there
is no system that gone help the visitor they only have printed map.he said that they have a
printed city guide map but people don’t use it actively because it is kind of outdated to
navigate using map.

7
Also we’ve interviewd some people that came for meeting in Adama city.

 Wezero worknesh Gesese


Wezero worknesh is the women that we found in AYUE International Hotel for meating.we
ask her what was her first difficulty when she arrive at Adama for the first time and she told
us that it was hard to find the Hotel that her company reserved and she was having trouble
finding the location.

 Ato Endalkachew
He was the cordinater of the meeting and he told us the main problem he faced was to find
the place like manly hotel, resturant, bank, hospital, hall, and was asking peoples around to
find the information they want to get. They don’t have any information about printed map
city guidance map.

1.10.2 Practical observation


We will observe and list what kind of places and services would a new person would want to
know in a city which helps our application to be more functional and useful for the user.

1.11 Development tools


This are tools that will help us to develop the application and to document the system facts.

Activities Tools/ Programs Purpose


Client side coding Android java programming, A language used to develop the
html,csse required tools for t mobile application and a for the
landing page that is used to
download the app and
discription about the app
Platform Mac OS X 10.11/ WINDOW Operating system we can used
7/8or Linux and android to run our web page.android
debuger and android device device and debuger to debug the
device.
Database server SQLite We Use to manage and Store
our Data
Diagram tools Enterprise Architect &visual To develop UML diagram of the
Paradigm project
Browsers All Internet Browsers Browser is used to display web
application via internet.
Example Mozilla Firefox,
Google chrome, internet
explorer etc…..
Editors Macromedia Dreamweaver, Editor software used to edit
Adobe photoshop some picture and web interface

8
on the project.
Documentation MS Word, MS Excel Application software we used to
Document our project.
Group working platform Github It allows the group members to
acess the sorce code remotely
that will help the development
to be quick.
Table 1-0-3 Development tools

1.12 Testing procedure


1.12.1 Requirement testing

In this phase we have focused on testing approach in which test cases, conditions and data are
derived from requirements. It includes functional tests and also non-functional attributes such as
performance, reliability or usability.

1.12.2 Unit testing

In this phase we have focused on testing the minimal software component, or module. Each unit
(basic component) of the software is tested to verify that the detailed design for the unit has been
correctly implemented. It is done at class level and resolves every missing syntax errors and
semantics errors.

1.12.3 Integration testing

We will use this phase of testing during integration (implementation) of the completed city
guidance system to verify that it meets its requirements. It is used to resolve the readability of the
system. It occurs after unit testing.

1.13 Overview of Project Phases


The typical software project includes the following phases:

 Requirements Analysis and Definition (System Overview): This phase begins with
analyzing what exactly the system has to do. The system overview helps see the big
picture of the project and understand which steps need to be carried out. The product of
this stage is the general system requirements. This document will be modified as the
project is undertaken.

 Functional Specification and UI Prototype: A functional specification determines what


exactly the target system must do and the premises for its implementation. All
requirements should be thoroughly defined and documented. The general system
requirements and other documents created in the first phase serve as input here.
Depending on the nature of the system, creating a UI prototype in this phase may be
crucially important for the success of the project.

9
 Software Architecture and Test Plan: In this phase, it is necessary to determine the
system components covering your requirements and the way these components will work
together.

 Implementation (Coding) and Testing: The goal of this phase is building the target
system based on the specifications developed in the previous phases. Transferring the
specification algorithms into a programming language

 Release and Installation: after the development and testing process is completed the
software will be released

 Operation and Maintenance: The task of this phase is the proper functioning of the
software. To improve a product or system, it should be continuously maintained.
Software maintenance involves detecting and correcting errors, as well as extending and
improving the software itself.

1.14 Required resources with cost

No Cost Type Quantity Unit price Total price


(Birr) (birr)
1 Paper 2pkt 150 300
2 Pen 1pkt 3 72
3 Flash disc 1 150 150
4 Print 150 1 150
5 Transport 150 150
6 Tea(coffee) 400 400
7 Internet
Total 1400
Table 1-0-4 Required resources with cost

10
1.15 Task and schedule

Figure 1-0-1 Task and schedule

11
Chapter Two
2 Description of the existing system
2.1 Major function of the current system
 Based on our conducted interview to Adama cultural and truism office the manager
provided us that the current system in Adama city is based on manual interaction and also
every information is provided to people with printed map and some fliers.

Major functions of the cultural and truism office


 Providing information with paper fliers.
 Proving location information with a printed out map.
 Mapping the city’s map
 Providing information using verbal techniques to the users

 Based on our analysis on some existing smart phone application (system). Their major
functions are only showing offline map and providing some contact information about
some services.
We can take the following android application for example:

App Name: WedeAddis Ababa

App Developer: Libra Technologies

App Description by Developer: Get insider tips and recommendations for the best
hotels, restaurants, shops and many more sights in Addis Ababa, Ethiopia. WedeAddis
Ababa: City Guide and Offline Map is designed to connect Hotels, Restaurants, Shops
etc. to the travelers. It works 100% Offline Including Map.

Major Functions:

 Viewing offline map: User have a menu icon dedicated to viewing offline map
 Services: Some included services in the app are:
o Transport: Some transport organization listed with their contact number
o Clinic & Hospital: Some Hospitals listed with their contact number

These services and contact information are already integrated into the app. Therefore, the
app won’t make any connection with servers.

12
2.2 Users of the current system

 Different peoples like


o Tourists: People who come and visit the city from the country or abroad.
o People who come for meeting in need of conference halls
o People who work on different projects inside the city
o Local people: who are looking for services
 Service Providers: like Hotels, hospitals and so on
o Provide their current locations and some contact information
o Providing their service for peoples who need the service
 Adama Cultural and Tourism Office
o Provides the printed out map to the users
o Collecting, managing and promoting services found inside the city or the
surrounding

2.3 Drawback of the current system

 Drawbacks of city guidance system in Ethiopia


 There are some tour guide companies that guide around the city but there is no city
guide system that shows all cities in the country.

 Drawbacks of the system provided by the Adama cultural and truism office;

 First the cultural and truism office record and retrieve all information manually and
recorded only on printed paper and map.
 The information providing about the city is a time consuming process.
 It’s hard to retrieve all service information, direction and location from the printed
paper map.
 The communication between the cultural and truism office the user is manually which
is verbal and because of this the communication is very slow and it is cost time and
energy consume

 Drawbacks of the current system (wede Addis Abeba app)

 Only provides offline map which users cannot interact with.


 The current system cannot provide direction services.
 Cannot access the locations of services directly from their list
 Users cannot access their current location

13
2.4 Business rule of the current system

The following table illustrates the business rules of our proposed system.

ID Rule Definition Type May change

BR-1 A person who wants to use this Static Static

application must have a smart phone with

android with minimum SDK version 4.0

(ice cream sandwich )

BR-2 There should be internet connection Computation Static

BR-3 The user should have reading and writing Fact Static

skill of English language to get exact

places.

The system will synchronize (update) the


BR-4 application database in some period of Computation Dynamic
time.

Table 2-1 Business rule of the current system

14
Chapter Three:
3 Proposed System
3.1 Proposed system (Overall description of the proposed system)
The proposed system aims at developing an Android based mobile application that guides a user
through Adama city. Data’s are recorded in the remote database server and the application syncs
automatically with the internal database and show the current status of the city. The application
needs an internet and GPS to provide accurate and latest information to the user. The proposed
system consists of the following advantages, time saving, provide information, and provide
direction and location of major services in the city.

This chapter presents solution of the project from architecture of solution including general
architecture, components diagram, class diagram, and data model, to implementation details of
functions.

3.2 Functional requirement


After exploring existing mobile city guides and scenarios, we list the functionalities in different
priorities. The priorities are given according to the importance of functions for a city guide. For
example, the function of showing map is very important for a city guide. The priorities are
divided into three different levels: High (H), Medium (M), and Low (L). H is considered the
most important for a city guide and implemented firstly, M is less important and implemented
after H, L is the least important and considered to implement after the high and medium.

Normally, city guide should have basic functions: showing map and showing points of interest
(POIs) on map, providing some information about sights or events (e.g. when the Hall is
available). In addition to them, we can add telephone function, the function of adding review. As
well, we explore implementation of functionalities as many as possible based on the features of
powerful Android platform since investigating realization of a tailor able City Guide application
on the Android platform is the main purpose in the project.

MAP

ID Requirement
Priority

1 The city guide can show map of a city. H

2 The map can be zoomed in and out H

3 Users can move around the map H

4 The city guide can show user’s current position on the map H

15
The city guide can show the route from the current location of the user to the
5 M
point of interest

6 The map can show points of interest (POIs) H

7 The map only shows the points of interest users are interested in M
Table 3-1 Map in Functional Requirements

 A point of interest, or POI, is a specific point location that someone may find useful or
interesting.

 Information Retrieval

ID Requirement
Priority

8 The city guide can retrieve information of points of interest H

The city guide can retrieve information of events, which will happen right
9 M
now.

10 The city guide can retrieve information about reviews of points of interest M

Users can select what kind of POIs to show on map (i.e. different
11 M
classifications. e.g. hotels, museums, restaurants events, and so on).
Table 3-2 Information Retrieval in Functional Requirements

16
3.3 Non-functional requirement

According to the goal of the project, the resulting prototype should be extendible, tailor able, and
explore and put existing innovational technologies as many as possible as building blocks in the
project. And user interface should be readable, easy to understand, and easy to operate.

ID Requirement Priority

1 The resulting prototype should be flexible (extendible and tailor able). H

2 The user interface should be usable, easy to understand and operate. H

The prototype should work with existing map framework innovational


3 H
technologies like Google Map as many as possible.
Table 3-3 Non-Functional Requirements

3.4 Performance Requirements


i. Hardware consideration
For the application to run smoothly the following hardware specification should be considered.
 Smart phone: an android running smart phone
 Device capabilities: touch screen, GPS, accelerometer, network connectivity
 Disk:50MB
ii. Software consideration
The following software consideration is important for the application to perform the functions
that are intended or developed to work. Using other or lower versions of android OS might cause
the application to crush or not perform properly.
 API level: minimum API level version 4.0.3 (Ice crème sandwich)
iii. Necessity
The system is bound in Adama city because there is no any system that provides information
about this city with direction and location and also this system help the user get information
easily.

17
iv. Documentation
At the completion of the project, every activity of the entire development, design and other
process will be documented for future reference. There will also be a documentation of how to
use the system and how the administrations manipulate data to database.

v. Accessibility
The accessibility degree of this system can be in many directions. First one is for the Adama city
guide users who will interact with the system to get information, services and directions through
the city. Second the administrator of the system who will interact with the backend system to
build and update service information or data. After lunching this mobile application user can
easily download the application and install on their android smart phone device then users can
access and use the application easily and friendly without any kind of difficulty.

For the users the services are available inside Adama city and the system is accessible anywhere
where internet and GPS system available.

The accessibility of the system will also improve by integrating different frameworks.

In general, for this system to comply with accessibility standards, it should at least need to have
or have the following:

 A live satellite connection with the users’ device.


 A working internet connection.
 A high contrast interface for individuals with low vision.
 Map validation from Google maps for the map contents.
 Service validation from the Adama city cultural and truism office or from the
service providers.

3.4.1 Performance consideration


Performance requirements define acceptable response times for the system functionality. Since
system will be accessed by many different android smart phones with different specs. So it
should be given more emphasis for the speed and response time of the application to acquire
optimal response to the user. The constraint characteristics also one of the performance
characteristics of the system, the constraints can be user’s device low RAM, Network or
connectivity failure with satellite and the internet and others. Therefore, our assumption
regarding performance consideration:

 The load time for user interface screens shall take no longer than thirty seconds.
 Connectivity with satellite should not take more time.

18
 Current location should be provided within 15-30 seconds.
 Directions should be verified and provided to the user within 15-30 seconds.
 The find in information shall be verified within maximum 15 seconds.
 Queries shall return results within maximum 15 seconds.
 The system shall be easy to install and use.

i. Error handling

When the users interact with the system there’s a possibility that errors may occur or appear. To
control these in accuracies the system will generate different messages. Errors which are entered
into the system may not be completely avoided but they can be minimized. To do this most of
the system execution buttons will be controlled according to the sequence which the user is
expected to follow or this can be done by the generating different system responses to the input
of the users. Therefore, problem that may occur in the interaction of the system will be handled
accordingly in order to make the system more user friendly.

ii. Usability

The extent to which this system or application can be used is mainly by the community of
Adama city and tourist or visitors who come to the city. The usability of the system is
determined by considering the following issues:

 Who are the users including the administrator and the user(customer)?
 What do the user and the users want or need to do?
 What is the general background of the services and the users?
 What has to be left to the system?
 How much training do users need?
 What and how many errors do users make while interacting with the system?
 Can the user recover from errors? What do users have to do to recover from errors? Does
the product help users to recover from errors? For example, does the app present
comprehensible, informative, non-threatening error messages?

Answer to these can be obtained by conducting user and task analysis at the start of the project
and through the development life cycle. User focused requirements analysis, building service
profile and usability testing and different evaluation methods will also provide the solution.

19
iii. User Privacy
The system will provide the proper security to the user. Like the current location of the user is
only visible or shared with the user. The system will not track the user’s location while the
application is off and user’s search will not be recorded. Therefore, the users shall not fear about
privacy issues and being exposed by the system.

3.5 System model


3.5.1 Scenario
Scenario is a good approach to generate design idea for new system. It can help
People understand better usage of the new system.

Users precondition

1. User must have smart phone running Android OS higher than 4.0 (Ice cream Sandwich)
2. The system or the Application must exist or installed on the user’s mobile phone (Smart
phone)
3. The application need Network connection with the internet and with Satellite (GPS).
Flow of events:

1. User downloads the application.


2. User install the system on their smart phone
3. User starts running the system or application

Scenario name: Current location

User Pre-condition: system must be launched; GPS connectivity must be on.

Participating instance actors: System user; Samson

Flow of events:

1. Samson must lunch the application by tapping on the application’s icon


2. Samson must tap on the icon that will help him get his current location

Scenario name: Search

Pre-condition: system must be launched; user must know what he/she want to search, user
should write the right spell of their search

20
Participating instance actors: Ephrem

Flow of events:

1. Ephrem must lunch the application by tapping on the application’s icon.


2. Ephrem taps the search bar and types Adama Germen Hotel.
3. System will provide or list search results.
4. Ephrem will tap on the first result with the name Adama Germen Hotel.
5. System will show detail information about Adama Germen Hotel.
6. Ephrem taps on the show on map.
7. System shows location of Adama Germen Hotel on map.
8. Ephrem taps on route.
9. System shows direction from Ephrem’s current location to Adama Germen Hotel.

Scenario name: Browse category

Pre-condition: system must be launched; user must know what he/she want to browse

Participating instance actors: System user; Samson

Flow of events:

1. Samson lunches the application by tapping on the application’s icon


2. Samson tap on the menu icon then tap on the category
3. System will prompt category list for Samson
4. Samson taps on the Hotel category
5. System will list Hotels in alphabetic order
6. Samson taps on Adama Germen Hotel
7. System will show detail information about Adama Germen Hotel.
8. Samson taps on the show on map.
9. System shows location of Adama Germen Hotel on map.
10. Samson taps on route.

21
11. System shows direction from Samson’s current location to Adama Germen Hotel.

Scenario name: About

Pre-condition: system must be launched; user must know what he/she want to browse

Participating instance actors: System user; Samson

Flow of events:

1. Samson lunches the application by tapping on the application’s icon


2. Samson taps on the menu icon
3. System prompts Samson with menu list
4. Samson taps on about
5. System view about information

Let see how it works with a practical example

Let say there is an annual conference in Adama city. And Participants named Samson came from
different city in country. The conference finishes on Friday. And he wants to spend the weekend
visiting the city before he leaves. He downloads the Adama city guide app and installs it on his
Android Smart phone. Then plans his route for the next day’s visit.

First he starts the App on his mobile phones. Then he browses through the categories for POIs
that he wants to visit. Then he taps on the Hotel category from the category list, the screen shows
the location of the hotel then he taps on the POIs showed on the map to see detail information.
Then after he taped on the POIs the detail information will open on another activity. Then the
new activity shows Description, contacts and rout icon. If he selects the rout direction, the app
will launch the map activity and show a direction from current position to the points of interest
on the map.

22
3.5.2 Use case model

Figure 3-1 Use case model

3.5.3 Use case description


The following tables describe the use cases in detail. And network connection and GPS (satellite)
connectivity to the actor’s smart phone device is considered to be in working state.

Use case id 1
Use case name SEARCH
Actor Ephrem
Description Search is to enable users choose what kind of
POIs to show on map such as bank, hotel and
so on, it retrieves POIs data from Database.
Precondition Ephrem should have smart phone that is
running android OS
Ephrem must install the Adama city guidance
If Ephrem must enter the right spelling of his
search on the search space.
Post condition The Search Categories look for the POIs from
the local database in the phone, and opens the
selected POIs on a new activity holding the
route and description about the place.
Normal flow Ephrem opens the application the system
show the browse services, the current location

23
and Ephrem types his search on the search
space
Table 3-4 search use case description

Use case id 2
Use case name Browse services
Actor Ephrem
Description Browse Categories is used to enable users
choose of what kind of POIs or service to
show on the category such as bank, hotel and
list them in catagories.
Precondition Ephrem should have smart phone that is
running android OS. Ephrem must install the
Adama city guide app.
If Ephrem must enter the right spelling of his
search on the search space.
Post condition Browse Services opens the POIs in a new
activity which holds contact and description
of the POIs.
Normal flow Ephrem opens the application; Ephrem select
menu then category. The category shows the
services that include in the system. Ephrem
continue browsing through the service until
he found the one he wants.
Table 3-5 browse service use case description

Use case id 3
Use case name View description
Actor Samson
Description View description helps the user to get the
description of services of their POIs. It could
be to get the description of such as bank, hotel
and so on, it retrieves POIs data (description,
contacts, longitude, latitude) from Database.
Precondition Samson should have smart phone that is
running android OS. Samson must install the
Adama city guide app.
Post condition View description of services will be shown
based on POIs or services that Samson
selected.
Normal flow Samson select menu then category button
The category shows the services. Samson
select his particular service then system views
description.
Table 3-6 view description use case description

24
Use case id 4
Use case name Get direction
Actor Ephrem
Description Get direction helps the user to get the
direction of services and POIs (bank, hotel
…), it shows POIs location on Google map.
Precondition Ephrem should have smart phone that is
running android OS. Ephrem must install the
Adama city guide app.
Post condition Get direction of services will be shown based
on the POIs Ephrem. Ephrem will be routed
to his POI.
Normal flow Ephrem lunches the app and select menu then
category button. The category shows the
services that include in the system. Ephrem
select the service then press the button “Show
on Map” to see the location of the services.
Then Ephrem will tap on the icon to get the
route from his current location to his POI.
Table 3-7 get direction use case description

Use case id 5
Use case name Plot on map
Actor Ephrem
Description Plot on map will pin point the service’s
location that the user selected on the map.
Precondition Ephrem should have smart phone that is
running android OS. Ephrem must install the
Adama city guide app.
Post condition Ephrem will be provided with the location of
his POIs pin pointed on the map.
Normal flow Ephrem select menu then category button
The category shows the services that include
in the system. Ephrem select the service then
press the button “Show on Map” to see the
location of the services on the map plotted.
Table 3-8 plot on map use case description

25
Use case id 6
Use case name Get location
Actor Ephrem
Description Get location helps the user to get his/her
current location and pin point it on the map.
Precondition Ephrem should have smart phone that is
running android OS. Ephrem must install the
Adama city guide app.
Post condition Get location will notify the user his/her
current location. User then can browse their
surroundings for services or POIs.
Normal flow Ephrem lunches the app and then press the
icon that will get his current location.
Table 3-9 get location use case description

Use case id 7
Use case name Create services
Actor Administrator
Description If the new services appear on the city and
have to be added to the system the admin will
create new services on the backend system.
Precondition First admin should have the right
authentication meaning username password.
Post condition New services will be pushed to the system
from the backend.
Normal flow Admin login to the backend and creates
services.
Table 3-10 create service use case description

Use case id 8
Use case name View services
Actor Administrator
Description View services used for viewing the new and
the updated services.
Precondition First admin should have the right
authentication meaning username password.
Post condition View the updated and created services
Normal flow Admin login to the backend and press the
view services button. System will view the
services with their description.
Table 3-11 view service use case description

26
Use case id 9
Use case name Login
Actor Administrator
Description Login page to the backend page
Precondition First admin should have the right
authentication meaning username password.
Post condition login to the data base and can
 Update service
 Create service
 View service

Normal flow Admin login to the backend by providing his


authentications and can create, update or view
services
Table 3-12 login use case description

27
3.6 Object Model
3.6.1 Data dictionary
The data dictionary is used to define each class contain in the system and the member of class
like attribute, operation and description about the classes.

Class Attributes Operation Description

Search Name Search Search from


category():search the category

getDiscription id, contacts,type getDescription() To show


information
about the point
of interests

About Description getAbout() Give detail


about the
software.

getCurrentLocation Latitude, Longitude getCurretlocation(): To indicate the


current
location

View Category Name,Id,description viewCategory() View the items


in the Category
list

Update Data Description,name,id updateMapLocation() Update and


read rout data
from the
database

getRoute Id,Description,latitude,longtude getRoute() Get route to


the location we
want to go
Table 3-13 Data dictionary

28
3.6.2 Class diagram
The figure below presents the class diagram of system; Map is the core and the start of the whole
application. Map extends MapActivity from the library com.google.android.maps. And
MapActivity extends Activity. Activity starts on the method onCreate(), and can creates a
window for you in which you can place your UI with setContentView(View). Map can create
Intent managing interaction between different components such as Activity and
ContentProvider.

Map starts several Activities such as

SearchActivity: start the function of search, zooming, and current location.

GpsActivity: to get user’s location.

ContentProvider: helps retrieve and store data.

Android uses SQLite database system. SQLiteOpenHelper is a helper class to manage database
creation and version management. In the project, we need to build a database class extending
SQLiteOpenHelper which is LocalCategoryDatabase handling POIs data.

Figure 3-2 Class diagram

29
3.7 Dynamic model
3.7.1 Sequence diagram

GetMyLocation: The message sequence chart below shows implementation of the functionality
of showing user’s current position on map.

a) Get MyLocation sets location listener of GPS_PROVIDER, which is system service


provided by Android platform and providing location data of current position.

b) GPS_PROVIDER informs Get MyLocation the change of location data in certain
frequency, which could be how much time (for example, 1minute) or how much distance
(e.g. 10 meters).
c) Then MapActivity changes users’ current location on map.

Figure 3-3 Sequence diagram: Get my location

30
Search: Users can choose what kind of POIs to show on map. There is a message sequence chart
below showing how to implement the search functionality. From Menu to start Search
component, users choose what kind of POIs, and the Search Component gets selected kind of
POIs data from local sight database, then call MapActivity to update map with the selected
kind of POIs data.

Figure 3-4 Sequence diagram: Search

31
Browse category: Users can choose what kind of POIs to show on map, the categories have
Bank, health center, Stadium, hotel, Hall, and other. There is a message sequence chart below
showing how to implement the browse category functionality. First open the Menu then
category component, the category lists the services, the user gets selected based on his/her
POIs data from local sight database, then display the selected POI on the map.

Figure 3-5 Sequence diagram: Browse category

32
Browse map: Users can browse services from the Map then, the LocalSightdatabase give the
detail about the browsed service to the map, after the location is found the user can route the
direction to the specific service location. There is a message sequence chart below showing how
to implement the browse map functionality.

Figure 3-6 Sequence diagram: Browse map

33
About: When the user went to get the information about the mobile application and about the
developer. There is a message sequence chart below showing how to implement the About
functionality. Menu then About component, the user gets information from local sight
database.

Figure 3-7 Sequence diagram: About

34
3.7.2 Activity diagram

 Category Browse: the following activity diagram show how the user browses through
the category. First he/she will open the application then the menu and the category.
Finally, user can start browsing.

Figure 3-8 Activity diagram: Category browse

35
 Search: the activity diagram that is shown below illustrates the search activity. After the
user runs the application he can tap on the search bar and input the search that he/she
wants

Figure 3-9 Activity diagram: Search

36
 About: The following activity diagram illustrates the about activity. User can see About
the application and the developer team by tapping on the menu and the About tab.

Figure 3-10 Activity diagram: About

37
3.7.3 State Diagram

 Category browse state diagram: The following state diagram shows how the category
browse works when the user interacts with the system. The user can get service list form
the category menu when he/she taps on the menu then the will show the Menu List after
that user will tap on category to view the service list.

Figure 3-11 Category browse state diagram

 Search state diagram: The following state diagram shows how the search process works
when the user interacts with the system. The user can search services by tap on the
search bar. If the user taps on search bar correctly, then the service will retrieve the
services from the database based on POI. Finally, the results will display suitable result
for user.

Figure 3-12 Search state diagram

 Description state diagram: The following state diagram shows the states and events that
the user and system will have while trying to view description about services.
o select from particular service of lists from the category list
For example, select hotel service from the category list
o particular service will be listed from category lists
Continue example from hotel services select specific hotel
o Finally display full information of service
Final example gives full information of selected (specific) hotel

38
Figure 3-13 Description state diagram

 get my location state diagram: The following state diagram show how to get the user
location. The users tap on the get my location button, then the user’s location is pin
pointed on the map if the process is successful or else error message is displayed.

Figure 3-14 get my location state diagram

39
3.7.4 User interface

 Home: User run the application Adama City Guide on a smart phone running android.
They start the application Adama City Guide. It shows like Figure 3-1 below: We can see
showing of a Map. And on the map there are some points of interest. We also can see
zooming buttons, current location button is for showing user’s current position on map
and the menu button and the search bar.

Figure 3-15 Interface: Home

40
 Menu: User presses the key “menu” on the mobile phone. It shows like Figure 3-2. We
can see that there are 3 options in menu. Search is for choosing what kind of POIs to
show on map, Category is for exploring the variety of services in more user friendly
view, About us is a little detail about the application and the developer team.

Figure 3-16 Interface: Menu

41
 Category: is for exploring the variety of services in more user friendly view.

Figure 3-17Interface: Category View

42
Chapter Four
4 System Design
4.1 Overview

This is the System Design document for Adama city guide system. The document includes the
design goals, the proposed system Design and the object design.

4.1.1 Purpose of the system


This document describes the design issues of the overall system. It provides the complete
architectural overview of the proposed system. It is intended to capture and express the
significant architectural decisions which have been made on the system.

4.1.2 Design Goal


The Design Goals specify the qualities of the system that should be achieved and addressed
during the design of the system. The design goals for the system are grouped into four categories.
These are:

Performance
In order for the Adama City guidance application to give the user a good service it should meet
the following performance criteria’s.
 Response time: the system is going to interact and respond to user’s request in a maximum
of 15 second, like searching for POIs in the category.
 Memory: The device needs an average of 10-15 megabits of free memory to be loaded on a
user’s mobile.
Dependability
Adama city Guide system should achieve these dependability characteristics in order to resist
crash.
 Robustness: since the mobile system updates the database from a web based database server
there might be an error during the process of updating a data due to server failure, network
failure but the system will provide an error message in synchronizing the data and continue
without crushing.
Maintenance
 Extensibility: if it is needed to add new functionality to the system, this must be achieved by
only making the next version of the application.
 Modifiability: if some functionality requires to be modified, this modification must be done
specifically to that function without affecting the overall functionality of the system, and the
system automatically updates itself when internet connection is available.
 Portability: the system is developed to be viewed in a mobile application that fulfills the
requirement and it can be installed on another device just by sending the apk (Application
Package) file.

43
End user

Users can get their visiting route based on their interests. In addition, the guide can give
information; provide special information to end users according to their personal preference.
From the user point of view, the system should provide the following end user criteria’s so
that the system can achieve At least 90% usability by the user.

 Utility: in order to help the user, to easily understand and interact with the system, the
system language must be easy understandable that expresses the function that activity is
giving.
 Usability: for the system to be more interactive in order to promote its usability. The
following usability principle has to be considered.
o Learnability: The ease with which new users can begin effective interaction and
achieve maximal performance. Any new user can use the system without any
effect (or any ambiguous). When the application opens the system shows current
location of the user and there is menu and search bar on the above interface.
 The system
 Has no ambiguous words.
 Has clear and easy interfaces.
 Does not require additional learning or training to use the system.
o Flexibility: The multiplicity of ways the user and system exchange information
 The system
 Supports the user to get the services that are stored in the database
by using search.
 Supports Multi-threading where users can pertain more than one
task. Like routing and searching at the same time.
 Supports the user to get the services using menu then categories,
categories show the list of services.
o Robustness: This process helps the user to achieve his/her goal
 Inside the system the user’s goal could be
 To get direction.
 To get services those are found in Adama city.
Therefore, the system will achieve user satisfaction based on the above usability
principles.

Priority Design goal


1 End user
2 Performance
3 Usability
4 Maintenance
Table 4-1 Design Goal Priority

44
4.2 Proposed system architecture
4.2.1 Overview
The system architecture can be represented as the following diagram puts, where the user can on
the smart phone side access the system. Whereas the system will simultaneously be connected to
a satellite using the smart phone’s GPS and connected to the internet to access the database.

Figure 4-1 System Tire Architecture

45
Figure 4-2 General System Architecture

The diagram above presents the general architecture of the prototype. we build the project based
on the assumption that users use their Android phones in the environment with wireless network
and having the ability of getting GPS data. GPS will be used for automatic localization since
android phones are usually equipped with GPS. MapActivity is the core and the start of
application. MapActivity imports Google Map as the map, and retrieves information of POIs
from remote Server. MapActivity calls MapOverlay to add POIs mark to Google Map.

Google Map is chosen as the map of Adama city guide; we consider it is easy to be implemented
on the platform of Android. Both Android and Google Map are released by Google. And we can
provide the most recent updated map since Google Map is frequently updated.
Server is responsible for providing points of interest (POIs) information or service information
including location, name, description, and category. The responsible that can feed this
information could be Adama cultural and tourism office. Adama city guide application visits
Server to get this information, which could be provided in the way of XML like below.

46
<sight>
<name>Adama German Hotel</name>
<description>Adama German Hotel is a large, luxury hotel situated in Franko
</description>
<address>http://Adamagerman.com</address>
<category>Hotel</category>
<latitude>63.4267</latitude>
<longitude>10.3964</longitude>
</sight>

The name is the name of POI or service, the description is little information about the service,
the link is the website of the service if available and users can get more information about
service. The category is the category of POIs such as bank, hotel and so on. The latitude and
longitude is the location of POI. When the application starts, it retrieves POIs data from XML
document and stores the data in the local sights database.

Client Server Communication

Figure 4-3 Client Server Communication

The android app make a request to a server php script using a class, Which handles
communication, opens a connection and receives a json string which it then processes into a
JSON object.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;

47
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

public class JSONParser {

// Response from the HTTP Request


static InputStream httpResponseStream = null;
// JSON Response String to create JSON Object
static String jsonString = "";

// Method to issue HTTP request, parse JSON result and return JSON Object
public JSONObject makeHttpRequest(String url, String method,
List<NameValuePair> params) {

try {
// get a Http client
DefaultHttpClient httpClient = new DefaultHttpClient();

// If required HTTP method is POST


if (method == "POST") {
// Create a Http POST object
HttpPost httpPost = new HttpPost(url);
// Encode the passed parameters into the Http request
httpPost.setEntity(new UrlEncodedFormEntity(params));
// Execute the request and fetch Http response
HttpResponse httpResponse = httpClient.execute(httpPost);
// Extract the result from the response
HttpEntity httpEntity = httpResponse.getEntity();
// Open the result as an input stream for parsing
httpResponseStream = httpEntity.getContent();
}
// Else if it is GET
else if (method == "GET") {
// Format the parameters correctly for HTTP transmission
String paramString = URLEncodedUtils.format(params, "utf-8");
// Add parameters to url in GET format
url += "?" + paramString;
// Execute the request
HttpGet httpGet = new HttpGet(url);
// Execute the request and fetch Http response
HttpResponse httpResponse = httpClient.execute(httpGet);
// Extract the result from the response
HttpEntity httpEntity = httpResponse.getEntity();
// Open the result as an input stream for parsing
httpResponseStream = httpEntity.getContent();
}
// Catch Possible Exceptions
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();

48
} catch (IOException e) {
e.printStackTrace();
}

try {
// Create buffered reader for the httpResponceStream
BufferedReader httpResponseReader = new BufferedReader(
new InputStreamReader(httpResponseStream, "iso-8859-1"), 8);
// String to hold current line from httpResponseReader
String line = null;
// Clear jsonString
jsonString = "";
// While there is still more response to read
while ((line = httpResponseReader.readLine()) != null) {
// Add line to jsonString
jsonString += (line + "\n");
}
// Close Response Stream
httpResponseStream.close();
} catch (Exception e) {
Log.e("Buffer Error", "Error converting result " + e.toString());
}

try {
// Create jsonObject from the jsonString and return it
return new JSONObject(jsonString);
} catch (JSONException e) {
Log.e("JSON Parser", "Error parsing data " + e.toString());
// Return null if in error
return null;
}
}
}

The php server, open an mySql connection to your SQL database, run an mySql->query() and do
something like the following with the result:

if (mysqli_num_rows($result) > 0) {
// looping through all results
$response["apps"] = array();

while ($row = mysqli_fetch_array($result)) {

$apps = array();

$apps["name"] = $row["name"];
$apps["longitude"] = $row["longitude "];
$apps["latitude"] = $row["latitude"];
$apps["address"] = $row["address"];
$apps["description"] = $row["description "];

// push single product into final response array


array_push($response["apps"], $apps);

49
}
// success
$response["success"] = 1;

// echoing JSON response


echo json_encode($response);

This iterates through the database response and encodes it into a JSON string which is sent back
to the android app which can then process it.

4.2.2 System process


Having identified and described the components of Adama City Guide system, it may be
necessary to show the overall processes for the system. The Figure below shows an activity
diagram, which illustrates the flow of events in Adama City Guide.

Figure 4-4 System process

50
4.2.3 Request Processor
This section explores how the user and request processor interact using architecture design
diagram. A top-level overview of the system, a brief overview of system processes or
functionality are described in the below section.

Figure 4-5 Request Processor

51
4.2.4 Subsystem Decomposition
Navigation: one of the subsystems in the Adama city Guide, helps to assess the location of
places. Implements PlotOnMap() and GetDirection() classes, to plot the exact location on map
and get the location of the user at a time.
Service Browsing: it is another subsystem used to search the services and get the full description
of the searched service in Adama city by implementing viewDescription() class. The services
and descriptions get from Service management subsystem.
Service management: The third subsystem of Adama city guide, the manager or someone
authenticated person with login user name and password can create new services, updates the
existing service and can view registered service.

Figure 4-6 Subsystem Decomposition Diagram

52
4.2.5 Hardware/ Software mapping
The system will have two processes, deployed in single or separate machine, that run in parallel,
namely, web server process and the database process. The database process, which runs on
Server database engine, is responsible for maintaining storing updated map information. Where
us the web server process is responsible to host a restless web service that accepts a request from
the mobile application and send the updated information from the database server.

4.2.6 Persistent Data management


The purpose of this section is to show the mapping of the objects/classes of the
system, identified during the analysis stage, in to the corresponding relational
database.

Figure 4-7 Class to Table mapping

Figure 4-8 class to database table

53
Figure 4-9 LocalCategoryDatabase mapping

Figure 4-10 SearchCategory mapping

Figure 4-11 GetRoute mapping

54
Figure 4-12 LocationManager mapping

Figure 4-13 CurrentLocation mapping

Figure 4-14 CategoryList mapping

55
4.2.7 Component diagram
The component diagram below contains all the components in the system. The Server will not be
implemented in this project, but we give the idea of implementation as described in last section
and emulate Server for testing the final prototype. The remaining parts will be implemented.

The application starts at the component MapActivity. MapActivity imports Google Map,
retrieves points of interest (POIs) data from Server and store it in LocalSightsDatabase that is
created when application starts and destroyed when application finishes, calls MapOverlay
which is overlay object of Google Map to draw POIs mark on map or further through route
direction is to show route between user’s current location and the service, and create Menu,
which has 3 options.

Figure 4-15 Component Diagram

56
Hardware components

The following figure shows the hardware components regarding the communications between
the components. The user’s smart phone will communicate with the GPS or satellite that
provides the users location.

Figure 4-16 Hardware components

Software Components

Figure 4-17 : Software Components

The main SW components building the basis for the Adama City Guide application.

57
4.2.8 Deployment diagram
The following deployment diagram shows the Adama city guide system. In the first node which
is the User’s smart phone with the second node Adama city guide systems pre-installed. The
system contains the following components inside it:
 The search: enable user to easily accesses his/her search needs.
 The map: contains information, direction and location of services plus its can pin-point
locations of the user.
 The category: provides displays services and their information.
The third node show the database server
 Is used to store different types of data for the application.
 It communicates with the first and second nodes using internet connection.
The forth node is the GPS satellite where is provides the exact location by passing longitude and
latitude coordination to the first node through GPS connectivity. Then the first node which is the
device will pass the coordination to the second node which is the system.

Figure 4-18 Deployment Diagram

58
4.2.9 Boundary condition
Most of the system design effort is concerned with steady-state behavior. However, the system
design phase must also address the initiation and finalization of the system. This is addressed by
a set of new uses cases called administration use cases

Dynamic Model of the System Startup

Adama City Guide is a system that runs properly when the user needs to use the system. But the
backend side must always be on the run. Therefore, users of the application (system) must start
the application from their android smart phone when they wish to use the system. After the
application (system) is started up, it is also necessary to connect the Internet and the Satellite.

For administrator to be able to access to the backend system it is also necessary to connect the
Internet through web browser, which must be installed on the machine to start the connection to
the server.

User Interface at Startup

User interfaces of the system are accessed only when the user lunches the application from
his/her device and start using the application. Therefore, user interfaces do not do anything when
the application (system) is on the state of off or pause, because for user interfaces to run the
system must be already started up and running.

Termination

Describes what resources are cleaned up and which systems are notified upon termination
("termination use cases"). If the application or the system is not started to run, then the
application interface will not be visible to the user and application will not be active. After the
user finishes his/her interaction with the system, he/she can terminate or kill the
application(system) from the Android’s multitasking screen.
Failure

There could be many possible causes for failures: Satellite connectivity failure, internet
connection failure, Bugs, errors, external problems (power supply).

Design foresees fatal failures (“failure use cases”).

59
Error Cause Forecast Solution
Insufficient Space on Device Android allocates fixed Free up space
storage space for apps. Users
can’t expand it. So user might
run into this error even if
his/her device indicates a
great deal of remaining
storage capacity.

System User Interface (UI) Could be many internal restarting the device
not working causes wiping the System UI cache

Some fatal errors Malware Scan with malware scanner

Internet not working Improperly configured APN Configure APN to get mobile
settings. data. If these settings aren’t
No internet from the user properly configured, user
internet service must manually set them.
provider(ISP). If the first step does not work
user should contact his/her
ISP.

Server Not found Internet connection fail Make sure Network


connection or firewall (proxy)
protection settings are
correct.
Locating and Navigation not Satellite connectivity failure Make sure GPS service is
working turned on.

Table 4-2 Design Goal Priority

60
4.2.10 Database design
The following database design shows how Adama city guide system’s database structure. The
database contains one table for the services which are hotel, bank, stadium, health center,
university, gas station, hall, super market. The table “POIs_table” contains the service’s name,
longitude, latitude, address information, category and description.

Figure 4-19 Database Design

61
4.2.11 Access controlling
The table below shows the global access table, describing the access relation between the actors,
objects and operations in the system:

Actors/Class User Server

SearchCategory searchCategory() saveToLocal(POIs_db)

GetRoute getRoute(decimal,decimal)

LocationManager getMyLocation()

CurrentLocation getLocation

LocalCatagroyDatabase getData(POIs_db)

CategoryList listCategory()

Table 4-3 Access control table

The user accesses the following methods:


searchCategory() method from the Search category class to search POIs from the category list.
getRoute() method to get direction to the POIs.
getMyLocation() method to get the current location of the user.
GetLocation() method to get the location of the POIs from the searchcategory or categoryList.
getData() method to get the data of the POIs from the localcategorydatabase
listCategory() method to see the category data in list.

62
Reference
[1] Maps.me, "MAPS.ME (MapsWithMe), detailed offline maps of the World for iPhone,
iPad, iPod, Android, Amazon Kindle Fire and BlackBerry", http://maps.me,
accessed Jan. 7. 2016..

[2]B. Brügge and A. Dutoit, Object-oriented software engineering. Pearson Education


Limited, Essex, 2014.

[3] Developer.android.com, "Android Developers", http://developer.android.com,


accessed Dec. 3. 2015..

[4]H. [closed], "How can I fetch data from a web server in an android application?",
http://stackoverflow.com/questions/16545378/how-can-i-fetch-data-from-a-web-
server-in-an-android-application, accessed Jan. 7. 2016..

[5] mwud.gov.et, "Ministry Of Urban Development & Housing", http://www.mwud.gov.et,


accessed Feb. 2. 2016..

63

You might also like