Final Project

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 71

Android Based Mobiles Tour Guide System 2014

CHAPTER ONE

1 PROPOSAL
1.1 Introduction
Android is an open source mobile operating system based on Linux with java support. It
comes under free and open source software licenses. As per First quarter Report of the
year 2012, 400 million people are using Android based devices worldwide and 59% of
smart phone market is occupied by android based smart phones. Android has a growing
selection of third party applications, which can be acquired by users either through an
App-store such as Google Play or the Amazon App-store, or by downloading and
installing the application's APK file from a third-party site. The Play Store application
allows users to browse, download and update apps published by Google and third-party
developers, and is pre-installed on devices that comply with Google's compatibility
requirements. The app-store filters the list of available applications to those that are
compatible with the user's device, and developers may restrict their applications to
particular carriers or countries for business reasons. Purchases of unwanted applications
can be refunded within 15 minutes of the time of download and some carriers offer direct
carrier billing for Google Play application purchases, where the cost of the application is
added to the user's monthly bill. The mobile applications are developed in the Java
language using the Android software development kit (SDK). The SDK includes a
comprehensive set of development tools including a debugger, software libraries, a
handset emulator based on QEMU, documentation, sample code, and tutorials. The
officially supported integrated development environment (IDE) is Eclipse using the
Android Development Tools (ADT) plug-in. We design and implement Android based
city guide system which can provide user with the information of hotel and embassies.
Mobile devices present many unique characteristics that make their use as electronic
tourist guides particularly attractive, such as

DBU IT dep’t, final year project Page 1


Android Based Mobiles Tour Guide System 2014
 Ubiquity and convenience: mobile devices are portable, ubiquitous devices that
come in many shapes and forms. Even though there is a convenience portable
computing devices and mobile phones are still most widely employed ubiquitous
computing devices readily available to tourists.
 Personalization: unlike pc's handheld devices are typically operated by single
users, thereby enabling the provision of personalized service by various
applications.
However, several restriction of mobile computing needs to be carefully evaluated by
tourist service provide such as restricted energy capacity, limited computing power,
amount of memory and storage, small display size, limited color and font number support
limited bandwidth and high cost of wireless connections and although the capability of
mobile device increase, the resource gap between mobile and stationary devices will
always be there.

1.2 Background
With the improvement of the tourist industry, many tend to build interactive application
for the purpose of guiding the tourist. But as the mobile technology developed, mobile
based application became increasingly popular among the people. Mobile phones are now
mini-computers which senses the environment through which they travel they gather and
generate data which can be Easley attached and abused yielding more intelligent aware
system. Newer mobile applications are leveraging the popularity of the social web
revolution and in particular system in which encourage users to generate and share
content online to enhance social mobile application. Although there are many web sites
developed for guiding tourist in Addis Ababa no any specific mobile application
developed for such purpose.

1.3 Statement of the problem


The integration of multiple technologies including tourism information systems has given
an existing new access to tourism information. As information based society tourist value
systems and services that inform them about the location of touristic objects like hotels,

DBU IT dep’t, final year project Page 2


Android Based Mobiles Tour Guide System 2014
museums etc… .This helps the tourist to find the most relevant accommodation or to
locate the position of specific tourist place. The existing tourism information system do
not reflect this requirement. Mobile based system provide more convenient for anyone to
access information.

1.4 Motivation
Mobile application is gaining more and more popularity in the research world, regardless
of the fact that it's a recent concept in information technology. This is because it is a way
of collaboratively doing tasks or solving problem. In the developed counties people are
using various mobile applications to be successful in their business areas and also solving
their problems such as finding a particular location and sharing of knowledge. So, that is
why we are highly motivated to do our project on mobile application. It is time for
developing countries like ours to share the success and power of mobile application in
solving problems in different areas.

1.5 Objective
1.5.1 General Objective
The general objective of this project is to develop a mobile application which is used as a
simple tour-guide for Addis Ababa city. That provides the necessary details on:
 Popular and historical tourist sites.
 Some well-known hotels.
 Most of the embassies.

 Large Non-Governmental Organizations.

1.5.2 Specific Objective


The specific objective of this project includes: -
 Getting familiar with development and installation of mobile application.
 Creating a system that can guide either a tourist or a citizen by providing aspecific
destination.
 Getting familiar with android based application development tool.
 Implementing mobile application and acquiring a new knowledge.

DBU IT dep’t, final year project Page 3


Android Based Mobiles Tour Guide System 2014
 Understanding how tour guide applications are developed and used.
 Lay concrete on a way to research in the area of android mobile applications in
DBU (Debre Birhan University) so that other students can havea foundation on
which they can add more advanced functionalities forguide.

1.6 Goal
The goal is to produce a piece of software that can be used in any Android phone. And
the Features of the software are: -
 User interface design that enables user's interaction with the application.
 A tour guiding functionality that accepts a data (name of a hotel, embassy, NGO
and museum) from a user and retrieves its location and some information of the
place.
 The result must be clearly rendered on the phone screen so that user can get
valuable information in an interesting way.

1.7 Scope and Limitation


1.7.1 Scope
Even if there are many sectors that require information sharing regarding city tour guide
for Addis Ababa, the scope of the project is to model and design a tour guide application
the scope of the project is to model and design a tour guide application most well-known
hotels, major embassies, museum and
Large NGO’s verbally.

1.7.2 Limitation
While developing the prototype for the tour guide application, we will be limited
To:-
 Provide only the destination information.
 Provide the information verbally.
 Since the application is a prototype it will only provide small information about
the places and
 Provide only very well-known places.

DBU IT dep’t, final year project Page 4


Android Based Mobiles Tour Guide System 2014
Due to the following reasons:-
 Since we do not use internet connection it will be impossible to know the user
location
 The distance from Addis Ababa to Debre Birhan hindered us form gathering all
the necessary information for our system to provide.

1.8 Significance of the project


Since Addis Ababa is the capital of Ethiopia as well as Africa a huge number of tourists
come to the city and managing this huge number of visitor by a single organization is
very hard rather it will be a lot better if we let the tourist to manage by their own by using
a mobile phone and clicking a single application and go where ever they wants to. In
addition to decreasing the work load of tour guide agencies, it will also reduce the time
and cost of a visitor that they spent to gat to some place.

1.9Feasibility study of the new system


The feasibility study is the preliminary study that determines whether a proposed system
project is financially ,technically and operationally viable .the alternative analysis usually
include as part of the feasibility study, identifies viable alternatives for the system design
and development.

1.9.1 Economic feasibility


Since this type of Application’s are new in our country the people acceptance toward this
system will be high and also there will be very less computation in the market due to this
reason's and other causes the project benefits will outweigh the expected cost.
But Since the Application is free for users we only get our benefit (income) from
advertisement of those organizationsthat we include in our application.

1.9.2 Technical feasibility


We believe that building a working system with acceptable characteristics, response time
and other performance parameter will involve through technical knowledge and
technology availability.

DBU IT dep’t, final year project Page 5


Android Based Mobiles Tour Guide System 2014
1.9.3 Operational feasibility
The new system will solve the problems of tourists and outlines possible alternatives of
finding a particular place .this application will be used by all types of users without
further introduction about its functionality.

1.10 Methodology
Methodology describes how the project team is going to implement the proposed system.
In order to do that first of all the project team have identified the main parts of the system
basically the project will be on developing a suitable mobile tour guide system for users.
And In order to do that we use the following methods.

1.10.1 Fact finding Techniques


The Method and techniques used to analyze the requirements to develop the applications
and designing electronic system includes, consulting the city administration office of
Addis Ababa, document analysis, practical observation and collection of detailed
information about the places that we are going to provide Information from the internet
These methods will help us to gather the required data, to analyze our project and these
methods are selected due to the time and the organization's willingness.

1.10.2 System Analysis and Design Techniques


In this project the team will use object oriented system development methodology
(OOSD) and it has two phases.

1.10.2.1 Object Oriented Analysis (OOA)


During this phase the team used to model the function of the system (use case modeling),
find and identify the business objects, organize the objects and identify the relationship
between them and finally model the behavior of the objects.

1.10.2.2 ObjectOrientedDesign (OOD)


During this phase the team uses rational rose software to refine the use case model, and to
reflect the implantation environment, model object interactions and behavior that support
the use case scenario and finally update object model to reflect the implementation
environment.

DBU IT dep’t, final year project Page 6


Android Based Mobiles Tour Guide System 2014
1.10.3 Tools and technologies
In this section we have described the tools and technology that we are going to use for
developing our proposed application.

1.10.3.1 Tools
1. Eclipse: We used Eclipse for development because it is a multi-language software
development environment comprising a base workspace and an extensible plug-in
system for customizing the environment.
2. Microsoft word: We used Microsoft word to write our report.
3. Rational rose: we will use rational rose to design the various use case diagrams.
4. Microsoft Visio: we will use rational rose to design the use case diagram.
5. Visual paradigm: we use Visual paradigm to design the data base.

1.10.3.2 Technologies
Android SDK: It includes a mobile device emulator, a virtual device emulator that runs
directly on computer. With the help of this emulator we will prototype, develop and test
our application without having a physical device (when one was not available).

1.11Time Schedule
The project is officially started on 10/03/2006EC and will be completed on 10/10/2006
EC.

Time

Activities
10/04/2006
11/04/2006-

01/05/2006-

16/09/2006-
10/03/2006-

20/06/2006.

15/09/2006.

09/10/2006.
30/04/2006

10/10/2006
1/07/2006-

DBU IT dep’t, final year project Page 7


Android Based Mobiles Tour Guide System 2014
Proposal
Requirement Analysis
Design
Implementation
&coding
Testing

project Defense

1.12 Cost Estimation


To conduct this project a moderate budget is required and we will summarize the
estimated cost in the following categories.
Material Birr Cent quantity Total birr
Paper 80 00 1 80.00
Pen 5 00 2 10.00
Flash 8GB 150 00 1 100.00
DVD-R 15 00 2 30.00
Laptop 12,500 00 1 12,500.00
Transportatio 50 00 10 500.00
n
print 1 00 75 75.00
Total 13,295.00

1.13 Resources
Based on the project plan above this project will need the following recourse's to meet
our goal.If fewer resources are available, the plan must be changed accordingly.
 Expertise from mobile application android system developers this is crucial
because the whole application and project will relay on it. The amount of
information we gather will have direct effect on the application.
 Time must be spent on studying how android application will work, UI design,
coding/implementation and reporting.
 User: the project will need some user/friends to test our application and receive
their feedback to evaluate the overall of project quality in the end.
DBU IT dep’t, final year project Page 8
Android Based Mobiles Tour Guide System 2014
 Hardware the project development must be based on a real Android phone so that
the scenario can be simulated, design and implementation can be better tested.

1.14 Risk
The main risks that we are going to face are:-

 Difficulties for us to build an application for an Android phone because our lack of
knowledge and coding experience for a mobile. We will certainly make mistakes
and following the philosophy of learning by doing. We will address the issue by
devoting more time on study of android programming.
 The schedule for the whole project are quiet short, we will manage this issue by
coping with the core functionality of application prioritized.
 Because we are going to develop an application that covers a wide area, collecting
information will be exsostive and time consuming. Due to that we might readjust
our schedule.
 Since the application requires some secure information we might not be able to
find those information's.
 Our lack of knowledge about android system.
 Lack of resources about mobile applications in general in this university.
 Shortage of time to gather all necessary information about the locations.

1.15 Team organization


The project team composed of5 members, one team leader, one deputy leader, one
secretary, and 2 members .Problem solving is group activity. Decision on problem and
approach are made by group agreement, which is much better than individual decision.

DBU IT dep’t, final year project Page 9


Android Based Mobiles Tour Guide System 2014

CHAPTER TWO

2 DESCRIPTION OF THE EXISTING SYSTEM

2.1 INTRODUCATION
It is necessary to know the existing system of a given organization or service to develop a
better system .The target area of this project is to develop a system that guide users by
providing certain information about the main hotels, Museums, Embassies and NGO’s.
The city that we are going to develop this system is Addis Ababa and it is located 136 km
from Debre Birhan.
In this section we are going to discusses about the existing system of tour guide in Addis
Ababa city, the system that we are going to develop, functional requirements for our
system and also non-functional requirements about our system.

2.2 Existing system description


Currently the system like we are going to develop is not in work and because of that most
users are forced to use one of the following options.
 Find an organization that provide a tour guide service.
 Find their destinations by using map.
 They will try to get information from people around them.
 Find a person who has knowledge about the location that they want to go.
 Find out the information that they need by Browsing the internet.

2.3 Players of the existing system


For using the existing system there are many organizations and peoples who have played
a great role. And some of them are:
 Tour guide organizations.
 Organizations who has hosted their web sites.
 People who give information when they are asked about the system.

DBU IT dep’t, final year project Page 10


Android Based Mobiles Tour Guide System 2014
 People who sell map and other similar tools.

2.4 Work flow of the existing system


There are various options in the work flow of the existing system and we will try to
describe some of them as follow.
1. Option 1:- when the users wants to know the location of either hotel, an embassy
or a Museums they will go to an organization which provide a tour guiding service
and they will ask whether the organization can take them where they want to go or
not, if the organization has peoples who can guide the users, the user will pay the
price for the service then they will be taken to the place that they wanted.
2. Option 2:- If the users wants to know about large hotels or the place where they
are located they will try to find a map of Addis Ababa and then buy a map so that
they can go to their destination by using the map.
3. Option 3:- the other option that the user uses is that they go to taxi drivers and they
will tell the driver where they want to go then if the driver knows the place he will
tell them the price then the driver will take them to their destination.
4. Option 4:- the other option that the user has left is to access different web sites and
then gather all the necessary information about where destination then they will go
based on the information that they gat.

2.5 Business Rules in the Existing System


A business rule is an effectively operating principle or polices that we try to specify for
both the existing system and the new system must satisfy. The business rule is a principle
or a policy in which the proposed system operates accordingly. It deals with access
control issues.
It often pertains to access control issues, operating policies and principles of the
organization. The organization has the following principles in the existing system which
includes:
1. Organizations may not function on weekends. So our system will solve
thisproblem because the system is in the user hand all the time.
DBU IT dep’t, final year project Page 11
Android Based Mobiles Tour Guide System 2014
2. Once downloaded, it doesn’t cost the user additional money or resource.

3. Tour guide organizations work a limited hour of a day while our system works
24/7.
4. Tour guide organizations do not work on holiday.

2.6 Problems of the existing systems


There are various problems that the user faced while using the current system and some
of the problems that the user have faced are listed below:

2.6.1 Miscommunication
If the user do not know the local language (Amharic) it will be difficult for the user to
gather all the necessary information’s that he/she needed.

2.6.2 Lack of trust


It is difficult to know whether the provided information is true or not.

2.6.3 Lack of knowledge


If the user do not know how to browse the internet it will be difficult for them to use one.

2.6.4 Misunderstanding
In the time of asking different peoples to get information, getting what they want may not
be easy.

2.6.5 Lack of Resource


It may not be easy for the users to find tour guide organizations. And also the maps may
not be currently updated.

2.6.6 Time consuming


While the user is accessing information getting it either from the tour guide agencies or
from other parties may take a lot of time.

2.7 Alternative Solution


As we try to describe above the current system faces some problems and the problems
primarily resulted from the manual system of running the activities and we try to put an

DBU IT dep’t, final year project Page 12


Android Based Mobiles Tour Guide System 2014
alternative solution to the problems which are described in the above Problems of
existing system section.
 The best alternative solution to solve the problems described above is to change
the system by a new system that the user can get anywhere at any time like our
system in addition to the current operational options.

2.8 The proposed system


The system that we are going to develop can solve different problems that we mention in
the existing system. As the title of the project indicates the new system will give different
information about what the user needs from the system. In general this system will reduce
the cost, time, and effort of the user and also it will provide such an easy way to use.

2.9 Functional requirement


These are requirements which are basic for the system or simply functional requirements
are requirements that the system must satisfy. These groups of requirement steers
functionality that the system should support for the user.
 The system will register information about museum, embassies, main hotels and
main international organizations.
 Once the user Purchases the application there will be no additional cost on the
user.
 The system accepts the destination form the user.
 The system will retrieve the necessary information from the database if it matches
with the list in the database.
 If the user enters a data that does not match with the data in the database the
system will display a message that say's destination does not match.

2.10 Nonfunctional requirement


These constraints are the user visible aspect of the system.
That includes:

DBU IT dep’t, final year project Page 13


Android Based Mobiles Tour Guide System 2014
User interface: Since users of the system involved people with different back ground,
the system should be made with user friendly interface type.
Performance and Access time: The system will provide fast access to the customer
according to their request.

CHAPTER THREE

DBU IT dep’t, final year project Page 14


Android Based Mobiles Tour Guide System 2014

3 ANALYSIS DELIVERABLES OF THE NEW SYSTEM


3.1 Introduction
Model is an abstraction of the real world. It allows us to deal with the complexity current
in a real-world problem by focusing on the essential and interesting features of an
application. The techniques and associated notation used for object oriented analysis and
design in incorporated in to a standard object oriented language called unify Modeling
language (UML). An important goal of requirement modeling is come to an
understanding of the useless problem that the new system is to address. This chapter
focuses on developing the requirement and analysis models for the new system using the
UML use case model, sequence diagram, activity diagram and class diagram and
interface prototyping are also included.

3.2Use Case Diagram


A use case is a sequence of action that provides a measurable value to an actor.Another
way to look at it is that a use case describes a way to which a real world to interacts with
the system. An essential use case sometimes called a business the case is simplified,
abstract, generalized use case that captures the intention of the user in a technology and
implementation independent manner.
The case models are used to document the behavioral (functional) requirement of a
system or the “what” of the system.
 A use case describes a sequence of action that provides a measurable value to an
actor and draw as a horizontal ellipse.
 An actor is a person, organization, or external system that plays a role in one or
more interactions with the system and draw as stickman figure.
Relationship between actors and use cases exists whenever an actor is involved with
an interaction described by a use case and modeled as a line connecting use cases and
actors.

DBU IT dep’t, final year project Page 15


Android Based Mobiles Tour Guide System 2014

Fig 3.1 Use Case Diagram.

Use case name: - View information.

Identification: - UC01.

Description: - user can view information about the destination they needed.

Actor: - User.

DBU IT dep’t, final year project Page 16


Android Based Mobiles Tour Guide System 2014
Precondition: - the user must have the application installed in their mobile phones.

Post condition: - The user accesses the information they needed.

Basic course of action

1. The user opens the application.


2. Main window will be displayed.
3. The user choose the option.
4. The system displays list of items.
5. The user selects an item from the list.
6. The user views the information.
7. End of use case.

Use case name: - update Information

Identification: - UC02.

Description: - to update existing information.

Actor: - User.

Precondition: - The user must have all the necessary information to be updated.

Post condition: - The information on the data base will be updated.

Basic course of action

1. The user opens the application.


2. Main window will be displayed.
3. The user chooses the option.
4. The system display list of items.
5. The user specific list to be updated.
6. The system displays update window.

DBU IT dep’t, final year project Page 17


Android Based Mobiles Tour Guide System 2014
7. The user updated the information and click update button.
8. The Information in the database will be updated.
9. End of use case.

Identification: - UC03.

Description: - To insert new destination information.

Actor: - User

Precondition: - the user must have all the necessary information to be inserted.

Post condition: - New destination will be registered.

Basic course of action

1. The user opens the application.


2. Main window will be displayed.
3. The user choose the option.
4. The system displays list of items.
5. The user click add button.
6. The user insert information and click save button.
7. System save the data and return to list of item.
8. End of use case.

Alternative course of action (if the user didn’t insert anything)

1. The system displays an error message.


2. The system exit automatically.

Use case name: - Delete Information.

DBU IT dep’t, final year project Page 18


Android Based Mobiles Tour Guide System 2014
Identification: - UC04.

Description: - to delete information from the database.

Actor: - User.

Precondition: - the user must know the information to be deleted.

Post condition: - the deleted information will be deleted from the data base.

Basic course of action

1. The user opens the application.


2. Main window will be displayed.
3. The user choose the option.
4. The system display list of items.
5. The user chooses an item from the list .
6. The user click update button.
7. The user click delete button.
8. The system deletes the information from the data base.
9. End of use case.

3.3 Analysis of Class diagram


 Class diagram shows the static structure of data and the operations that act on the
data, i.e. it shows the static structure of an object-oriented model the object class,
their internal structure and the relationships in which they participate.
 Class diagrams describe the structure of the system in terms of classes and objects.
Classes are abstractions that specify the attributes and behavior of a set of objects.
Objects are entities that encapsulate state and behavior. Each object has an
identity.

DBU IT dep’t, final year project Page 19


Android Based Mobiles Tour Guide System 2014

Table Hotel Table Embassy


Hotel Name Embassy Name
Star Area
Area Distance
Distance Website
Website Email
Email Fax
Fax POBox
POBox Phone
Phone_no Basic Informatoin
Basic Information
Update Record()
Insert Record() Delete Record()
Update Record() Insert Record()
Delete Record() Select Record()
select Record()

Table Musium Table NGO


Musium Name NGO Name
Area Area
Distance Distance
Website Website
Email Email
Fax Fax
POBox POBox
Phone Phone
Basic Information Basic Information

Select Record() Update Record()


Insert Record() Delete Record()
Delete Record() Insert Record()
Update Record() Select Record()

Fig 3.2 Class Diagram.

3.4 Sequence diagram


Sequence diagrams are dynamic model of use cases, showing the interaction among
classes during a specified time period. Sequence diagrams graphically document the use
case by showing the classes, the messages, & the timing of the messages.

The interaction proceeds from top to bottom a vertical timeline, while the horizontal
arrows represent messages from one object to another.
DBU IT dep’t, final year project Page 20
Android Based Mobiles Tour Guide System 2014
Sequence diagrams are used to model the logic contained in usage scenarios. A usage
scenario is the description of the way a potential use case is used.

A sequence diagram in our system is used to formalize the behavior of the system and to
visualize the communication among objects. It helped us to identify additional objects
and participate in the use case. This phase of the document ties use cases with objects and
shows 2the behavior of a use case is distributed among its participating objects.

DBU IT dep’t, final year project Page 21


Android Based Mobiles Tour Guide System 2014

View Main Window List of Items Detail Information Database


User
Usecase #01 Window Window

USER 1: Activates Main window ()

1. Activate Main
Window 2: Main Window Will be Displayd()
3.Choose Option
5. Select Tareget
From the List.

SYSTEM 3: Chooses Option ()

2. Main window will


be displayd
4. List of Item will be
Displayd 4: List of Items Will be displayd()
6.Acess Information
from the database 5: Select Target from the list()
7. Display
Information to detail
Window.
6: Acess Informationfrom the database()

7: Display Information ()

Fig 3.3 View Sequence diagram

DBU IT dep’t, final year project Page 22


Android Based Mobiles Tour Guide System 2014

Update Main Window List of Items Detail Update Database


User
Usecase#02 Window Informati... Window
1 Activates Main window ()

USER 2 Main Window Will be Displayd()

1. Activate Main
Window 3: Chooses Option ()
3.Choose Option
5. Select Tareget 4: List of Items Will be displayd()
From the List.
8. Click Update
Button 5: Select Target from the list()
10.Update
Information
6: Acess Informationfrom the database()
SYSTEM
7: Display Information ()
2. Main window will
be displayd
4. List of Item will be 8: Click Update Button()
Displayd
6.Acess Information
from the database 9 Update Window Will be Displayd()
7. Display ...
Information to detail
Window.
9. Update Window 10: Update Information()
will be Displays
11.Update
information in 11 : Update In Database()
database
12 Information will
be updated.
12: Information Will be updated()

Fig 3.4 Update sequence diagram

DBU IT dep’t, final year project Page 23


Android Based Mobiles Tour Guide System 2014

Insert List of Items Main Window Add Window Database


User
Usecase#03 Window
1 Activates Main window ()

USER 2 Main Window Will be Displayd()

1. Activate Main
Window Chooses
3: Option ()
3.Choose Option
5. Click Add 4:
Button.
7.Insert Information List of Items Will be displayd()
Click
5: Add Button()
SYSTEM

2. Main window 6: Add Window will be Display...


will be displayd
4. List of Item will
7: Inserts Information()
be Displayd
6.Add window will
be displayd 8: Insert Information in to Database()
8.Insert Information
to Database
9.New Information
will be insertede. ...
9 Information will be inserted()

Fig 3.5 Insert sequence diagram

DBU IT dep’t, final year project Page 24


Android Based Mobiles Tour Guide System 2014

Delete Main Window List of Items Detail Update Database


User
Usecase#04 Window Informati... Window
1 Activates Main window ()

USER 2 Main Window Will be Displayd()

1. Activate Main
Window 3: Chooses Option ()
3.Choose Option
5. Select Tareget 4: List of Items Will be displayd()
From the List.
8. Click Update Button
10.Update Information Select Target from the list()
5:
SYSTEM
6: Acess Informationfrom the database()
2. Main window will be
displayd 7: Display Information ()
4. List of Item will be
Displayd
6.Acess Information 8: Click Update Button()
from the database
7. Display Information
to detail Window. 9 Update
... Window Will be Displayd()
9. Update Window will
be Displayd
11. Deleting
information on 10: CLick Delete Button()
Database.
12. Information Will
11 Deliteing
: information Database()
be Deleted.

12: Information Will be Deleted()

Fig 3.6 Delete sequence diagram

DBU IT dep’t, final year project Page 25


Android Based Mobiles Tour Guide System 2014
3.5 Activity diagram
Is one of the components of UML It highlights the activities performed in the system.
Each activity is represented by a narrow and more oval shape. The processing with in an
activity goes to completion and then an automatic transition to the next activity occurs an
arrow represents the transition from one activity to the next. The starting point of an
activity diagram is represented by a filled-in circle and an end point represented by bull’s
eye.

Activity diagram are used to document the logic of a single operation/method, a single
use case, or flow of logic of business operation. In many ways activity diagram are the
object oriented equivalent of flow charts and data flow diagrams (DFD) from structured
development. This part of the project documentation consists of an activity diagram that
shows the flow of action in main use cases.

DBU IT dep’t, final year project Page 26


Android Based Mobiles Tour Guide System 2014

User

View Information
UC#01 Start The
Actor:User application

Choose
Option

Choose
Destnation

View
Information

End

Fig 3.7 Search Activity diagram

DBU IT dep’t, final year project Page 27


Android Based Mobiles Tour Guide System 2014

Update
Information
UC#02 Start the
Actor:User Application

Choose
Option

Choose
Destnation

Click Update
Button

Update
Information

Fig 3.8 Update Activity diagram

DBU IT dep’t, final year project Page 28


Android Based Mobiles Tour Guide System 2014

Insert
Information
Start the
UC#03
Application
Actor:User

Choose
Option

Choose Add
Button

Insert
Information

Fig 3.9 Insert Activity diagram

DBU IT dep’t, final year project Page 29


Android Based Mobiles Tour Guide System 2014

Delete Information
uc#04
Actor:User Start the
Application

Choose
Option

Choose Update
Button

Delete
Information

Fig 3.10 Delete Activity diagram

DBU IT dep’t, final year project Page 30


Android Based Mobiles Tour Guide System 2014

CHAPTER FOUR
4 DESIGN DELIVERABLES OF THE NEW SYSTEM
4.1 Introduction
The purpose of designing is to show the direction how the Application is built and to
obtain clear and enough information needed to drive the actual implementation of
application. It is based on understanding of the model the Application built on system
design also focuses on decomposing the system in to manageable parts.

4.2 Design goals and objectives


The objectives of designing are to model a system with high quality. Implementing of
high quality system depends on the nature of the design created by the designer .If one
wants to make changes to the system after it has been put in to operation depends on the
quality of the system design. So if the system is designed perfectly, it will be easy to
make changes to it.

The goal of the system design is to manage complexity by dividing the system in to
manageable pieces.

Some of the goals are listed below.

 Modifiability: The system should be modifiable to modify different services


depending on the need of the user.
 Flexibility: The system should be changeable to suit new condition or situation.
 Efficiency: The system must do what it supposed to do efficiently without the
problem.

DBU IT dep’t, final year project Page 31


Android Based Mobiles Tour Guide System 2014
4.3 Design of Class diagram
 Class diagram represents a detailed view of a single use case, shows the classes

that participate in the use case, and documents the relationship among the classes.
It is a logical model, which evolves into a physical model & finally becomes
functioning information system. Class diagram evolve into code modules, data
objects, & other system components.

Table Hotel Table Embassy


Hotel Name : Varchar(25) Embassy Name : Varchar(25)
Star : int(10) Area : Varchar(25)
Area : Varchar(25) Distance : float(3)
Distance : float(3) Website : Varchar(20)
Website : Varchar(20) Email : Varchar(10)
Email : Varchar(15) Fax : Varchar(10)
Fax : Varchar(10) POBox : Varchar(10)
POBox : Varchar(10) Phone : Varchar(10)
Phone_no : Varchar(10) Basic Informatoin : Text(250)
Basic Information : Text(250)
Update Record : boolean()
Insert Record: boolean() Delete Record : boolean()
Update Record : boolean() Insert Record : boolean()
Delete Record : boolean() Select Record : boolean()
select Record : boolean()

Table Musium Table NGO


Musium Name : Varchar(25) NGO Name : Varchar(25)
Area : Varchar(25) Area : Varchar(25)
Distance : Float(3) Distance : Float(3)
Website : Varchar(20) Website : Varchar(10)
Email : Varchar(10) Email : Varchar(10)
Fax : Varchar(10) Fax : Varchar(10)
POBox : Varchar(10) POBox : Varchar(10)
Phone : Varchar(10) Phone : Varchar(10)
Basic Information : Text(250) Basic Information : Text(250)

Select Record : boolean() Update Record : boolean()


Insert Record : boolean() Delete Record : boolean()
Delete Record : boolean() Insert Record : boolean()
Update Record : boolean() Select Record : boolean()

Fig. 4.1 Class Diagram


DBU IT dep’t, final year project Page 32
Android Based Mobiles Tour Guide System 2014

4.4 Collaboration diagram


Like sequence diagram, the collaboration diagram shows how objects interact. It shows
the objects along with the messages that travel from one to another. The sequence
diagram emphasizes the time ordering of interaction. Whereas the collaborative diagram
emphasizes the context and the overall organization of the objects that interact. It shows
the message the object sends in addition to the association among objects. Moreover it
arranged according to space whereas sequence diagram is arranged according to time. To
represent a message, you draw an arrow near the association line between two objects.
The arrow points to the receiving object. A label near the arrow shows what the message
is. The message typically tells the receiving object to execute one of its operations.

DBU IT dep’t, final year project Page 33


Android Based Mobiles Tour Guide System 2014

1: Activates Main window ()

Main
Window
User : NewClass2

4: List of Items Will be displayd()


2: Main Window Will be Displayd()

List of Items
Window

6: Acess Informationfrom the database()

Detail Information
Window
3: Chooses Option () 7: Display Information ()
5: Select Target from the list()

Database

Fig 4.2View Collaboration diagram

DBU IT dep’t, final year project Page 34


Android Based Mobiles Tour Guide System 2014

as

3: Chooses Option...
5: Select Target from the list()
List of Items
Window
2: Main Window Will be Displayd()
User :
NewClass2 10: Update Information()

9: Update Window Will be Displayd()

4: List of Items Will be displayd() Update


1: Activates Main window () Window

8: Click Update Button() 6: Acess Informationfrom the database()

Main 12: Information Will be updated()


Window 11: Update In Database()

Detail Information
Window Databa
7: Display Information () se

Fig 4.3 Update Collaboration diagram

DBU IT dep’t, final year project Page 35


Android Based Mobiles Tour Guide System 2014

3: Chooses Option...
5: Click Add Button()

List of Items
Window
2: Main Window Will7:beInserts
Displayd()
Information()
User :
NewClass2

6: Add Window will be Displayd()

Add
1: Activates Main window () 4: List of Items Will be displayd()
Window

9: Information will be inserted()


Main
Window 8: Insert Information in to Database()

Databa
se

Fig 4.4 Insert Collaboration diagram

DBU IT dep’t, final year project Page 36


Android Based Mobiles Tour Guide System 2014

3: Chooses Option...
5: Select Target from the list()

List of Items
Window
2: Main Window Will be Displayd()
User :
NewClass2 10: CLick Delete Button()

9: Update Window Will be Displayd()

Update
1: Activates Main window () 4: List of Items Will be displayd()
Window

8: Click Update Button() 6: Acess Informationfrom the database()

Main 12: Information Will be Deleted()


Window 11: Deliteing information Database()

Detail Information
Window Databa
7: Display Information () se

Fig 4.5 Delete Collaboration diagram

DBU IT dep’t, final year project Page 37


Android Based Mobiles Tour Guide System 2014
4.5 State chart diagram
The state chart diagram used to show the sequence of states that an object goes through the
events that cause the transition from one state to the other and the actions that result from a state
change.

Idle Activate Choose Normal Exit Select Item


Option
Initial State
UnNormal Exit
Ignor View

Complate State View


Information

Fig 4.6 View State Chart diagram

Idle Activate Choose Normal Exit Select Item


Option
Initial State
UnNormal Exit
Ignor View

Complate State Update


Information

Fig 4.7 Update State Chart diagram

DBU IT dep’t, final year project Page 38


Android Based Mobiles Tour Guide System 2014

Idle Activate Choose Normal Exit Click Insert


Option Button
Initial State
UnNormal Exit
Ignor Insert

Insert
Complate State Information

Fig 4.8Insert State Chart diagram

Idle Activate Choose Normal Exit Select Item


Option
Initial State
UnNormal Exit
Ignor View

Ignor Delete Update


Information

Complate State

Delete
Information

Fig 4.9 Delete State Chart diagram

DBU IT dep’t, final year project Page 39


Android Based Mobiles Tour Guide System 2014
4.6 Data base design
Database Design is the database structure that will be used as plan to Store and manage
the data. The database management system (DBMS) is the software used to implement a
database design. Modern database and applications development software is so easy to
use that many people can quickly learn to implement a simple database and Develop
simple applications within a week or so, without giving design.

Much thought, as data and reporting requirements become more complex, those same
people will simply and produce the required data by incorrectly adding more columns of
tables to the database.

Fig 4.10 Data Base diagram

DBU IT dep’t, final year project Page 40


Android Based Mobiles Tour Guide System 2014

CHAPTER FIVE
IMPLEMENTATION DELIVERABLE OF THE NEW SYSTEM
5.1 Introduction
Implementation refers to the Coding of the all documents gathered starting from
requirement analysis to Design phase. So now the team is in a position of converting all
documents gathered and designed into the code so that the system will be implemented
for the user to be used for the purpose it developed. To implement it the user must have
smart phones which have an android operating system.

5.2 Component diagram


In this Diagram components of the system will be wired showing that there is relation
among components, management of the system, database and operations performed on
databases such security issue. This in some extent shows which component or objects
will be accessed by whom and what type of security infrastructures it is using. The
diagram is simulated below.

Fig 5.1 Android OS Architecture Diagram

DBU IT dep’t, final year project Page 41


Android Based Mobiles Tour Guide System 2014
5.3 Android OS Architecture
Android operating system is a stack of software components which is roughly divided
into five sections and four main layers as shown below in the architecture diagram.

Fig 5.2 Android OS Architecture Diagram

DBU IT dep’t, final year project Page 42


Android Based Mobiles Tour Guide System 2014
5.4 Deployment diagram
Android is a software stack for mobile devices that includes an operating system,
middleware and key applications. Android relies on Linux OS for core system services
such as security, memory management, process management, network stack, and driver
model. The Linux kernel also acts as an abstraction layer between the hardware and the
rest of the software stack.
Android applications are written in Java. Android SDK tools compile and package the
code along with any required data and resource files into Android application archive
file having .apk suffix. The .apk file represents one Android application to be deployed to
the Android-enabled mobile devices.

Fig 5.3 Deployment Diagram of the system.

DBU IT dep’t, final year project Page 43


Android Based Mobiles Tour Guide System 2014
5.5 user interface design
In this system users will communicate with the system through the following user interfaces.

Main Window: This form appears on the first form of the application in which the system deployed
is opened and contains some links which lead the user to other windows according to his Interest,

Fig 5.4 Home Window of the system.

DBU IT dep’t, final year project Page 44


Android Based Mobiles Tour Guide System 2014

Fig 5.4 Hotel List Window of the system.

DBU IT dep’t, final year project Page 45


Android Based Mobiles Tour Guide System 2014

Fig 5.4 Insert Hotel Window of the system.

DBU IT dep’t, final year project Page 46


Android Based Mobiles Tour Guide System 2014

Fig 5.4 Hotel


Detail
Window of
the system.

Fig 5.4
Update Hotel
Window of
the system.

Chapter Six

DBU IT dep’t, final year project Page 47


Android Based Mobiles Tour Guide System 2014

Prototype development
Prototype development can be defined it is the sample code of the given project. These
are some of the sample codes that we have done.

Java class for main window.


package com.example.touraddis;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.Toast;

import com.example.tablemodels.Hotel;
import com.example.tablemodels.Musium;
import com.example.tableoperations.EmbassyTableOperations;
import com.example.tableoperations.HotelTableOperations;
import com.example.tableoperations.MusiumTableOperations;
import com.example.tableoperations.NgoTableOperations;

public class mainhomActivity extends Activity implements OnClickListener{

Context context;
HotelTableOperations hotelsTableOperations= new HotelTableOperations(this);
MusiumTableOperations musiumesTableOperations= new
MusiumTableOperations(this);
EmbassyTableOperations embassyTableOperations= new
EmbassyTableOperations(this);
NgoTableOperations ngoTableOperations= new NgoTableOperations(this);
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);

ImageButton hotel=(ImageButton) findViewById(R.id.imageButton1);


ImageButton musium=(ImageButton) findViewById(R.id.imageButton2);
ImageButton embassy=(ImageButton) findViewById(R.id.imageButton3);
ImageButton ngo=(ImageButton) findViewById(R.id.imageButton4);

hotel.setOnClickListener(this);
musium.setOnClickListener(this);

DBU IT dep’t, final year project Page 48


Android Based Mobiles Tour Guide System 2014
embassy.setOnClickListener(this);
ngo.setOnClickListener(this);

testConnection();
//finish();
}

public void onClick(View v) {


if (v.getId()==R.id.imageButton1){

startActivity(new Intent(mainhomActivity.this,
hotelListActivity.class));
finish();
}
else if (v.getId()==R.id.imageButton2){

startActivity(new Intent(mainhomActivity.this,
musiumListActivity.class));
finish();
}
else if (v.getId()==R.id.imageButton3){

startActivity(new Intent(mainhomActivity.this,
embassyListActivity.class));
finish();
}
else {

startActivity(new Intent(mainhomActivity.this,
ngoListActivity.class));
finish();
}
}

//===============================//
private void testConnection() throws NullPointerException{
//lets assume we accept the the following values of a hotel from xml-
edit text
Hotel hotel=new Hotel();
Musium musium=new Musium();

musium.setMusium_name("4 killo");
musium.setArea("4 kilo");
musium.setDistance((float) 2.5);
musium.setWebsite("www.4killo.com");

DBU IT dep’t, final year project Page 49


Android Based Mobiles Tour Guide System 2014
musium.setEmail("4killo@gmail.com");
musium.setFax("42345");
musium.setPobox(879);
musium.setPhone("72389423");
musium.setBasic_info("our sdfsdf ijsdfasdfasdfn sdfasdfsdf");

hotel.setHotel_name("Hilton");
hotel.setStar(5);
hotel.setArea("mexico");
hotel.setDistance((float) 80.5);
hotel.setWebsite("www.hilton.com");
hotel.setEmail("hilton@gmail.com");
hotel.setFax("42345");
hotel.setPobox(879);
hotel.setPhone("72389423");
hotel.setBasic_info("our sdfsdf ijsdfasdfasdfn sdfasdfsdf");

hotel.setHotel_name("Jupiter");
hotel.setStar(5);
hotel.setArea("Kasanchis");
hotel.setDistance((float) 5.5);
hotel.setWebsite("www.jupiter.com");
hotel.setEmail("jupiter@gmail.com");
hotel.setFax("42345");
hotel.setPobox(879);
hotel.setPhone("72389423");
hotel.setBasic_info("our sdfsdf ijsdfasdfasdfn sdfasdfsdf");

hotelsTableOperations.insertHotel(hotel);
musiumesTableOperations.insertMusium(musium);
//hotelsTableOperations.deleteHotel(hotel.getHotel_name());
Hotel h=new Hotel();
Musium m=new Musium();
m=musiumesTableOperations.getMusium(musium.getMusium_name());
h=hotelsTableOperations.getHotel(hotel.getHotel_name());

Toast.makeText(this, "the newly inserted hotel is:\n " +


m.getMusium_name()
+ " : " + m.getDistance(), Toast.LENGTH_LONG).show();

DBU IT dep’t, final year project Page 50


Android Based Mobiles Tour Guide System 2014
Xml file for main window
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#80B2FF" >

<ImageButton
android:id="@+id/imageButton3"
android:layout_width="150dp"
android:layout_height="125dp"
android:layout_alignParentLeft="true"
android:layout_alignTop="@+id/imageButton4"
android:src="@drawable/imagesembassy" />

<ImageButton
android:id="@+id/imageButton2"
android:layout_width="150dp"
android:layout_height="125dp"
android:layout_above="@+id/imageButton4"
android:layout_alignParentRight="true"
android:layout_marginBottom="70dp"
android:src="@drawable/index" />

<ImageButton
android:id="@+id/imageButton1"
android:layout_width="150dp"
android:layout_height="125dp"
android:layout_alignParentLeft="true"
android:layout_alignTop="@+id/imageButton2"
android:src="@drawable/download" />

<ImageButton
android:id="@+id/imageButton4"
android:layout_width="150dp"
android:layout_height="125dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="87dp"
android:src="@drawable/downloadngo" />

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

DBU IT dep’t, final year project Page 51


Android Based Mobiles Tour Guide System 2014
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/imageButton1"
android:layout_below="@+id/imageButton1"
android:text="Hotels"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0000CC"
android:textSize="@dimen/item_text_size" />

<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageButton2"
android:layout_alignParentRight="true"
android:layout_below="@+id/imageButton1"
android:text="Musiumes"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0000CC"
android:textSize="@dimen/item_text_size" />

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignRight="@+id/imageButton3"
android:layout_below="@+id/imageButton3"
android:text="Embasies"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0000CC"
android:textSize="@dimen/item_text_size" />

<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imageButton4"
android:layout_alignParentRight="true"
android:layout_below="@+id/imageButton3"
android:text="NGO&apos;s"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0000CC"
android:textSize="@dimen/item_text_size" />

</RelativeLayout>

Java class for hotel list Activity

DBU IT dep’t, final year project Page 52


Android Based Mobiles Tour Guide System 2014
package com.example.touraddis;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

import com.example.SQLiteHelper.OpenHelper;
import com.example.listAdapter.ListAdapter;
import com.example.tablemodels.Hotel;
import com.example.tableoperations.HotelTableOperations;
public class hotelListActivity extends Activity implements OnClickListener{

ListView hotels;
Button inserthotelbutton,hotelbackbutton;
String[] hotelsSpiner;
//String[] option;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.hotel);

hotelsSpiner = getResources().getStringArray(R.array.hotels_spin_array);
Spinner hotel_spiner = (Spinner) findViewById(R.id.hottelspinner);
ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_dropdown_item,
hotelsSpiner);
hotel_spiner.setAdapter(adapter1);

hotel_spiner.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> arg0, View arg1,

DBU IT dep’t, final year project Page 53


Android Based Mobiles Tour Guide System 2014
int arg2, long arg3){
int index = arg0.getSelectedItemPosition();
Toast.makeText(getBaseContext(),
"You have Sorted the list by : " +
hotelsSpiner[index], Toast.LENGTH_SHORT).show();
String orderBy=OpenHelper.COLUMN_HOTEL_NAME;
if(hotelsSpiner[index].equalsIgnoreCase("By Name"))
orderBy=OpenHelper.COLUMN_HOTEL_NAME;
else if(hotelsSpiner[index].equalsIgnoreCase("By Star"))
orderBy=OpenHelper.COLUMN_STAR;
else if(hotelsSpiner[index].equalsIgnoreCase("By
Distance"))
orderBy=OpenHelper.COLUMN_DISTANCE;
else if(hotelsSpiner[index].equalsIgnoreCase("By
Location"))
orderBy=OpenHelper.COLUMN_AREA;

populateListView(orderBy);
}
public void onNothingSelected(AdapterView<?> arg0) {

}
});

inserthotelbutton=(Button) findViewById(R.id.inserthotelbutton);
hotels=(ListView) findViewById(R.id.hotels_list);
inserthotelbutton.setOnClickListener(this);
hotelbackbutton=(Button) findViewById(R.id.hotelbackbutton);
hotelbackbutton.setOnClickListener(this);

}
private void populateListView(String orderBy) {

HotelTableOperations hotelTableOperations=new
HotelTableOperations(getApplicationContext());
List<Hotel> hotelsList=new ArrayList<Hotel>();
hotelsList=hotelTableOperations.getAllHotels(orderBy);
List<String> nameList = new ArrayList<String>();
List<String> starDistanceList = new ArrayList<String>();
List<String> areaList = new ArrayList<String>();

try {
for (Hotel h : hotelsList) {
nameList.add(h.getHotel_name());
starDistanceList.add(String.valueOf(h.getStar()));
areaList.add(h.getArea());

DBU IT dep’t, final year project Page 54


Android Based Mobiles Tour Guide System 2014
}
} catch (NumberFormatException e) {
Log.d("hotel_activity", e.getMessage());
e.printStackTrace();
}

ListAdapter adapter=new ListAdapter(getApplicationContext(), nameList,


starDistanceList, areaList);
hotels.setAdapter(adapter);

hotels.setOnItemClickListener(new OnItemClickListener() {

@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
TextView hotel_name = (TextView)arg1.findViewById(R.id.textViewName);
String hotelName =hotel_name.getText().toString();
goToHotelDetailActivity(hotelName);
Toast.makeText(hotelListActivity.this, "this is the clicked hotel: " +
hotelName, Toast.LENGTH_LONG).show();

private void goToHotelDetailActivity(String hotelName) {


Intent theIntent=new Intent(hotelListActivity.this,
HotelDetail1Activity.class);
theIntent.putExtra("hotelName", hotelName);
startActivity(theIntent);
//finish();
}

});
}
@Override
public void onClick(View v) {
if(v.getId()==R.id.inserthotelbutton){
Intent intent=new
Intent(hotelListActivity.this,InsertHotelActivity.class);
startActivity(intent);
finish();
}
else if(v.getId()==R.id.hotelbackbutton){
Intent intent=new
Intent(hotelListActivity.this,mainhomActivity.class);
startActivity(intent);

DBU IT dep’t, final year project Page 55


Android Based Mobiles Tour Guide System 2014
finish();
}
}
}

Xml file for hotel list activity

<?xml version="1.0" encoding="utf-8"?>


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:scrollbars="vertical"
android:background="#80B2FF" >

<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_weight="1"
android:background="#000"
android:text="Order By"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#fff" />

<ListView
android:id="@+id/hotels_list"
android:layout_width="match_parent"
android:layout_height="309dp"
android:layout_above="@+id/inserthotelbutton"
android:layout_alignParentLeft="true"
android:layout_below="@+id/hottelspinner"
android:layout_weight="1.06" >

</ListView>

<Button
android:id="@+id/inserthotelbutton"
android:layout_width="173dp"
android:layout_height="50dp"

DBU IT dep’t, final year project Page 56


Android Based Mobiles Tour Guide System 2014
android:layout_alignBaseline="@+id/hotelbackbutton"
android:layout_alignBottom="@+id/hotelbackbutton"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:text="Add hotel"
android:textColor="#80B2FF"
android:background="#000" />

<Button
android:id="@+id/hotelbackbutton"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/inserthotelbutton"
android:layout_weight="1"
android:text="Back"
android:textColor="#80B2FF"
android:background="#000" />

<Spinner
android:id="@+id/hottelspinner"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView2"
android:fitsSystemWindows="false" />

</RelativeLayout>
</LinearLayout>

Java class database creating class

package com.example.SQLiteHelper;

import android.content.Context;

import android.database.sqlite.SQLiteDatabase;

import android.database.sqlite.SQLiteOpenHelper;

DBU IT dep’t, final year project Page 57


Android Based Mobiles Tour Guide System 2014

public class OpenHelper extends SQLiteOpenHelper {

//Database helper class contains all the methods to perform database operations
like

//opening connection, closing connection, insert, update, read, delete and other
things.

//============= Database version ==============//

private static int DATABASE_VERSION=1;

//============= Database name ==============//

private static final String DATABASE_NAME = "tour_addis.db";

//============= Table names ==============//

public static final String TABLE_HOTELS = "hotels";

public static final String TABLE_MUSIUMES = "musiumes";

public static final String TABLE_EMBASSY = "embassies";

public static final String TABLE_NGO = "ngos";

//============= ACCOUNTS Table - column nmaes ==============//

public static final String COLUMN_HOTEL_NAME = "hotel_name";

public static final String COLUMN_MUSIUM_NAME = "musium_name";

public static final String COLUMN_EMBASSY_NAME = "embassy_name";

DBU IT dep’t, final year project Page 58


Android Based Mobiles Tour Guide System 2014
public static final String COLUMN_NGO_NAME = "ngo_name";

public static final String COLUMN_STAR = "star";

public static final String COLUMN_AREA = "area";

public static final String COLUMN_DISTANCE = "distance";

public static final String COLUMN_WEBSITE = "website";

public static final String COLUMN_EMAIL = "email";

public static final String COLUMN_FAX = "fax";

public static final String COLUMN_POBOX = "pobox";

public static final String COLUMN_PHONE = "phone";

public static final String COLUMN_BASIC_INFO = "basic_info";

//============= Table Create Statements ==============//

// hotels table create statement...

public static final String CREATE_TABLE_HOTEL = "CREATE TABLE " +


TABLE_HOTELS + " ( "

+ COLUMN_HOTEL_NAME + " TEXT NOT NULL PRIMARY KEY ,


"

+ COLUMN_STAR + " Integer NULL , "

+ COLUMN_AREA + " TEXT NOT NULL , "

+ COLUMN_DISTANCE + " REAL NULL , "

+ COLUMN_WEBSITE + " TEXT NULL , "

+ COLUMN_EMAIL + " TEXT NULL , "

+ COLUMN_FAX + " TEXT NULL , "

DBU IT dep’t, final year project Page 59


Android Based Mobiles Tour Guide System 2014
+ COLUMN_POBOX + " INTEGER NULL , "

+ COLUMN_PHONE + " TEXT NOT NULL , "

+ COLUMN_BASIC_INFO + " TEXT NULL "

+ ")";

// MUSIUM table creating statement

public static final String CREATE_TABLE_MUSIUM = "CREATE


TABLE " + TABLE_MUSIUMES + " ( "

+ COLUMN_MUSIUM_NAME + " TEXT NOT NULL


PRIMARY KEY , "

+ COLUMN_AREA + " TEXT NOT NULL , "

+ COLUMN_DISTANCE + " REAL NULL , "

+ COLUMN_WEBSITE + " TEXT NULL , "

+ COLUMN_EMAIL + " TEXT NULL , "

+ COLUMN_FAX + " TEXT NULL , "

+ COLUMN_POBOX + " INTEGER NULL , "

+ COLUMN_PHONE + " TEXT NOT NULL , "

+ COLUMN_BASIC_INFO + " TEXT NULL "

+ ")";

// EMBASSY table creating statement

public static final String CREATE_TABLE_EMBASSY =


"CREATE TABLE " + TABLE_EMBASSY + " ( "

+ COLUMN_EMBASSY_NAME + " TEXT NOT


NULL PRIMARY KEY , "

DBU IT dep’t, final year project Page 60


Android Based Mobiles Tour Guide System 2014
+ COLUMN_AREA + " TEXT NOT NULL , "

+ COLUMN_DISTANCE + " REAL NULL , "

+ COLUMN_WEBSITE + " TEXT NULL , "

+ COLUMN_EMAIL + " TEXT NULL , "

+ COLUMN_FAX + " TEXT NULL , "

+ COLUMN_POBOX + " INTEGER NULL , "

+ COLUMN_PHONE + " TEXT NOT NULL , "

+ COLUMN_BASIC_INFO + " TEXT NULL "

+ ")";

// NGO table creating statement

public static final String CREATE_TABLE_NGO = "CREATE


TABLE " + TABLE_NGO + " ( "

+ COLUMN_NGO_NAME + " TEXT NOT NULL


PRIMARY KEY , "

+ COLUMN_AREA + " TEXT NOT NULL , "

+ COLUMN_DISTANCE + " REAL NULL , "

+ COLUMN_WEBSITE + " TEXT NULL , "

+ COLUMN_EMAIL + " TEXT NULL , "

+ COLUMN_FAX + " TEXT NULL , "

+ COLUMN_POBOX + " INTEGER NULL , "

+ COLUMN_PHONE + " TEXT NOT NULL , "

+ COLUMN_BASIC_INFO + " TEXT NULL "

+ ")";

DBU IT dep’t, final year project Page 61


Android Based Mobiles Tour Guide System 2014

//===========================Inserting
information========================/

public static final String INSERT_INTO_TABLES = "INSERT INTO "+


TABLE_HOTELS
+"(hotel_name,star,area,distance,website,email,fax,pobox,phone,basic_info)
VALUES('SHARATON aDDIS',5,'FLU
WUHA',10.1,'WWW.SHARATON.COM','SHARATON@GMAIL.COM','123AS',1234,'
12345QW','I MADE IT')";

public static final String INSERT_INTO_MUSIUMES = "INSERT INTO "+


TABLE_MUSIUMES
+"(musium_name,area,distance,website,email,fax,pobox,phone,basic_info)
VALUES('SHARATON aDDIS','FLU
WUHA',10.1,'WWW.SHARATON.COM','SHARATON@GMAIL.COM','123AS',1234,'
12345QW','I MADE IT')";

public static final String INSERT_INTO_EMBASSY = "INSERT INTO "+


TABLE_EMBASSY
+"(embassy_name,area,distance,website,email,fax,pobox,phone,basic_info)
VALUES('SHARATON aDDIS','FLU
WUHA',10.1,'WWW.SHARATON.COM','SHARATON@GMAIL.COM','123AS',1234,'
12345QW','I MADE IT')";

public static final String INSERT_INTO_NGO = "INSERT INTO "+


TABLE_NGO +"(ngo_name,area,distance,website,email,fax,pobox,phone,basic_info)
VALUES('SHARATON aDDIS','FLU
WUHA',10.1,'WWW.SHARATON.COM','SHARATON@GMAIL.COM','123AS',1234,'
12345QW','I MADE IT')";

public OpenHelper(Context context) {

super(context, DATABASE_NAME, null, DATABASE_VERSION);

DBU IT dep’t, final year project Page 62


Android Based Mobiles Tour Guide System 2014
}

@Override

public void onCreate(SQLiteDatabase db) {

db.execSQL(CREATE_TABLE_HOTEL);

db.execSQL(CREATE_TABLE_MUSIUM);

db.execSQL(CREATE_TABLE_EMBASSY);

db.execSQL(CREATE_TABLE_NGO);

@Override

public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

db.execSQL("DROP TABLE IF EXISTS " + TABLE_HOTELS);

db.execSQL("DROP TABLE IF EXISTS " + TABLE_MUSIUMES);

db.execSQL("DROP TABLE IF EXISTS " + TABLE_EMBASSY);

db.execSQL("DROP TABLE IF EXISTS " + TABLE_NGO);

// create new tables

onCreate(db);

Java class for creating getter and seter


package com.example.tablemodels;

public class Hotel {

//colums of hotels table

DBU IT dep’t, final year project Page 63


Android Based Mobiles Tour Guide System 2014
public String hotel_name;
public int star;
public String area;
public float distance;
public String website;
public String email;
public String fax;
public int pobox;
public String phone;
public String basic_info;

public Hotel(){
this.hotel_name =null;
this.star =0;
this.area = null;
this.distance =(float) 0.0;
this.website =null;
this.email =null;
this.fax =null;
this.pobox = 0;
this.phone = null;
this.basic_info = null;
}
public Hotel(String hotel_name, int star, String area, float distance,
String website, String email, String fax, int pobox, String
phone,
String basic_info) {
this.hotel_name = hotel_name;
this.star = star;
this.area = area;
this.distance = distance;
this.website = website;
this.email = email;
this.fax = fax;
this.pobox = pobox;
this.phone = phone;
this.basic_info = basic_info;
}

public void setHotel_name(String hotel_name) {


this.hotel_name = hotel_name;
}
public void setStar(int star) {
this.star = star;
}
public void setArea(String area) {
this.area = area;

DBU IT dep’t, final year project Page 64


Android Based Mobiles Tour Guide System 2014
}
public void setDistance(float distance) {
this.distance = distance;
}
public void setWebsite(String website) {
this.website = website;
}
public void setEmail(String email) {
this.email = email;
}
public void setFax(String fax) {
this.fax = fax;
}
public void setPobox(int pobox) {
this.pobox = pobox;
}
public void setPhone(String phone) {
this.phone = phone;
}
public void setBasic_info(String basic_info) {
this.basic_info = basic_info;
}

public String getHotel_name() {


return hotel_name;
}
public int getStar() {
return star;
}
public String getArea() {
return area;
}
public float getDistance() {
return distance;
}
public String getWebsite() {
return website;
}
public String getEmail() {
return email;
}
public String getFax() {
return fax;
}
public int getPobox() {
return pobox;

DBU IT dep’t, final year project Page 65


Android Based Mobiles Tour Guide System 2014
}
public String getPhone() {
return phone;
}
public String getBasic_info() {
return basic_info;
}
}

Android Manifest File

<?xml version="1.0" encoding="utf-8"?>


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.touraddis"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>

<uses-permission android:name="android.permission.SEND_SMS" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.touraddis.HomeActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>

DBU IT dep’t, final year project Page 66


Android Based Mobiles Tour Guide System 2014
<activity
android:name="com.example.touraddis.mainhomActivity"
android:label="@string/app_name" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.touraddis.InsertHotelActivity"
android:label="New Hotel" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name="com.example.touraddis.InsertEmbassyActivity"
android:label="New Embassy" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name="com.example.touraddis.InsertMusiumActivity"
android:label="New Musium" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.touraddis.InsertNgoActivity"
android:label="New NGO" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.example.touraddis.hotelListActivity"
android:label="List of Hotels"/>
<activity android:name="com.example.touraddis.musiumListActivity"
android:label="List of Musiumes"/>
<activity android:name="com.example.touraddis.embassyListActivity"
android:label="List of Embassies"/>
<activity android:name="com.example.touraddis.ngoListActivity"
android:label="List of NGO's"/>
<activity android:name="com.example.touraddis.HotelDetail1Activity"
android:label="Hotel Information"/>

DBU IT dep’t, final year project Page 67


Android Based Mobiles Tour Guide System 2014
<activity android:name="com.example.touraddis.NgoDetail1Activity"
android:label="NGO Information"/>
<activity android:name="com.example.touraddis.MusiumDetail1Activity"
android:label="Musium Information"/>
<activity android:name="com.example.touraddis.EmbassyDetail1Activity"
android:label="Embassy Information"/>

<activity android:name=".touraddisdb"/>
<activity android:name="com.example.touraddis.EditHotelActivity"
android:label="Edit Hotel"/>
<activity android:name="com.example.touraddis.EditMusiumActivity"
android:label="Edit Musium"/>
<activity android:name="com.example.touraddis.EditEmbassyActivity"
android:label="Edit Embassy"/>
<activity android:name="com.example.touraddis.EditNgoActivity"
android:label="Edit NGO"/>
<activity android:name=".check"/>
</application>

</manifest>

Chapter Seven

DBU IT dep’t, final year project Page 68


Android Based Mobiles Tour Guide System 2014

Conclusions and recommendation


7.1 Conclusions

This is a system development project with two phases; the first phase deals with the
analysis phase of the life cycle, and the next phase addresses the Design phase. As the
end of the first phase, we need to review that we have covered in accordance with what
we have planned at the beginning. We began our work by identifying the significance of
Creating a mobile application that can guide user to reach their destination. This involved
defining the system development methodology, identifying resource and cost
requirements, and setting the deliverable and scheduled for the project.
The business area Analysis helps the team to truly understand the major functional
areas and processes of the system. Through this we evaluate the existing system
weakness and strength.

After that, we performed requirements identification to discover user and system


requirements. This phase consisted of drawing the functional as well as non-functional
requirements of the system. Then we have undertaken a major phase in system
development process: object oriented Analysis. In this phase, we tried to model the new
system we proposed using UML diagrams: Use case, sequence, and activity and class
diagrams Also, we designed the new system user interface prototype.

DBU IT dep’t, final year project Page 69


Android Based Mobiles Tour Guide System 2014
7.2 RECOMMENDATION
The system that we are trying to develop is not a fully executed system. Because we were
new to the system we missed out some parts which should be included in the system.
This is mainly due to limited development capacity, shortage of resource and shortage of
time.

Therefore, we suggest the following features need to be incorporated in any further


revision and extension attempt.

- Connecting the application with the internet.


- Inserting the appropriate Image to the destination places
- Connecting the application with the Google map so that the user can see the
destination map.
- Since the user may not know his/her current location it would be better if the
application can show the user current location
- And lastly it would be better if there is an external database to the system that only
the developer can alter so that when update to the system is needed it will be
updated accordingly

DBU IT dep’t, final year project Page 70


Android Based Mobiles Tour Guide System 2014

REFERENCE

1. http://www.tutorialspoint.com/android/index.htm
2. http://developer.android.com/samples/index.html
3. http://www.tutorialspoint.com/sdlc/sdlc_rad_model.htm
4. http://www.tutorialspoint.com/sqlite/index.htm
5. http://www.vogella.com/tutorials/AndroidSQLite/article.html
6. http://www.tutorialspoint.com/uml/

DBU IT dep’t, final year project Page 71

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy