07.05.2014 Views

Group ASA Low Level Design Report - Bilkent University

Group ASA Low Level Design Report - Bilkent University

Group ASA Low Level Design Report - Bilkent University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Department of Computer Engineering<br />

<strong>Bilkent</strong> <strong>University</strong><br />

Senior <strong>Design</strong> Project<br />

Project short-name: EGOguide<br />

<strong>Low</strong>-<strong>Level</strong> <strong>Design</strong> <strong>Report</strong><br />

Project <strong>Group</strong> Member: SERCAN VARLI 20503287<br />

AHMET YUKSEKER 20701206<br />

ANIL Y<strong>ASA</strong>R 20602664<br />

MUHAMMET EROL 20702668<br />

DATE : 18/02/2012<br />

Supervisor: OZCAN OZTURK<br />

Jury Members: IBRAHIM KORPEOGLU and BEDIR TEKINERDOGAN<br />

1


Table of Contents<br />

1. Introduction ................................................................................................................................. 3<br />

Object <strong>Design</strong> Trade-offs ................................................................................................................ 3<br />

Space vs. Time: ............................................................................................................................ 3<br />

Existing Components vs. New Components: .............................................................................. 4<br />

Object-Oriented Database <strong>Design</strong> vs. Performance and Interoperability: ................................. 4<br />

Development Time vs. Performance: ......................................................................................... 4<br />

Interface Documentation Guidelines .............................................................................................. 4<br />

Engineering Standards .................................................................................................................... 5<br />

Definitions, acronyms, and abbreviations ...................................................................................... 5<br />

References ...................................................................................................................................... 5<br />

2. Packages ...................................................................................................................................... 6<br />

Overview ......................................................................................................................................... 6<br />

Package Decomposition .................................................................................................................. 7<br />

GUI Package ................................................................................................................................ 7<br />

Application Package .................................................................................................................... 7<br />

Database Package ....................................................................................................................... 8<br />

3. Class Interfaces ........................................................................................................................... 9<br />

4. Glossary ..................................................................................................................................... 14<br />

2


1. Introduction<br />

This project aims effectively to use the developing technology. The project name is<br />

“EGOguide”. “EGOguide” is a simple android phone application for Ankara city of Turkey. This is<br />

designed to find how a person go to somewhere where he want to go by using public<br />

transportation for Ankara city of Turkey. In other words, the system helps to find a route for the<br />

target address and gives you information which is number of buses or subway, addresses of bus<br />

stations or subway stations and also it can give you your current location and approximate<br />

distance of between departure and arrival points. Besides, the system can inform you about<br />

time of buses and subway. In addition to this, it can help you to find a simplest or alternative<br />

route to go from departure point to arrival point on foot. When this system can observe your<br />

location, it can warn you in the location where you close to arrival. Generally, this is a magic<br />

city transportation guide system. If you don’t know addresses of bus and subway stations, time<br />

of them, ID’s of them and general addresses of the city, the application is the most important<br />

helper for you.<br />

The previous report described the high level design of the project. In this report we are<br />

going to describe low level design of the project. In part 1, we will describe the object design<br />

trade offs, interface documentation guidelines and definitions, acronyms, and abbreviations. In<br />

part 2, we will introduce our packages and their figures. In part 3, we will describe the class<br />

interfaces in detail in terms of interface documentation guidelines. Finally, in the 4th part, the<br />

references will be stated.<br />

Object <strong>Design</strong> Trade-offs<br />

Space vs. Time:<br />

When user tries to find the shortest path between current location and destination point<br />

or between any given two place, the system has to be online to use Google Maps to make<br />

calculations which means much response time compared to offline systems. However our system<br />

requires less disk space.<br />

3


Existing Components vs. New Components:<br />

Our system will be using some existing components such as Google Map’s own<br />

components to simplify implementation of the project. By using existing components instead of<br />

building new ones, we plan to create more reliable system with less effort, time and space.<br />

Another existing component that we will be using is open database connectivity(ODBC) to<br />

connect to system database.<br />

Object-Oriented Database <strong>Design</strong> vs. Performance and Interoperability:<br />

We will use object oriented design (Java) to implement our system since our project will be<br />

used in Android mobile phones. Although the implementation part will be easy to develop, easier,<br />

faster and the system will be more reliable since we use OOP, the performance of the system will<br />

decrease. In addition, object orientation causes interoperability problems.<br />

Development Time vs. Performance:<br />

In order to gain best performance from the whole system, we may exceed the time which<br />

is required to implement the system. Estimated development time can be considered as a main<br />

constraint but we need to spare an extra time for testing processes in order to make an efficent<br />

and accurate result.<br />

Interface Documentation Guidelines<br />

We use the following documentation style to present the classes:<br />

Description: Brief explanation of the class/interface.<br />

Parameter Name: The name of parameter<br />

Parameter Type: The type of parameter<br />

Function Name: The name of function.<br />

Return Type: The return type of function.<br />

Function Description: Brief explanation of the function.<br />

Exception Name: The name of the possible exception that may be thrown.<br />

Exception Reason: The possible reason of the exception.<br />

Package Name: The name of the package that class belongs to.<br />

4


Class Name: Name of the class or interface<br />

Engineering Standards<br />

First of all, in the project we have planned to follow IEEE standarts to model our UML<br />

components. At the beginning of this stage, we specified the project’s requirements and<br />

constraints to formulate the system’s UML class hierarchy. Then we removed potential risks by<br />

carefully analyzing the system. At the end of this step, the system’s prototype is ready to<br />

implement which will be followed with testing. In other words, the program’s validation is<br />

satisfied. If the validation is unsuccessful, we repeat some previous steps as in waterfall software<br />

development model.<br />

Definitions, acronyms, and abbreviations<br />

ACRONYM / ABBREVIATIONS<br />

EXPANSION<br />

EGOguide<br />

Default Route<br />

ODBC<br />

Sqlite<br />

Google Maps<br />

Bus and route tracking system<br />

The most used routes by users<br />

Open database connectivity<br />

Android database system<br />

Api of the google maps for developers on android system<br />

References<br />

1- http://ug.bcc.bilkent.edu.tr/~i_yasar/C491High<strong>Level</strong><strong>Design</strong><strong>Report</strong><strong>Group</strong><strong>ASA</strong>.pdf<br />

2- https://developers.google.com/maps/<br />

3- http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html<br />

4- http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Waterfall_model.html<br />

5


2. Packages<br />

This section presents the packages of our application, EGOGuide. When this part is compared<br />

to subsystem decomposition, there is no obvious difference because our application contains only<br />

one package for all layers. This section is more meaningful for the projects that have more than<br />

one package for each layer.<br />

Overview<br />

Our application has three packages which are Presentation Package, Application Package<br />

and Database Package. Subsystem decomposition of our project is shown below.<br />

GUI is the top level of our packages and it provides interaction views between user and<br />

application. Main function of this package is to take necessary information from the user and<br />

6


showing the desires of users like path, common places and map. Application package is the most<br />

important package of our application. It performs main job. The application package is allowed to<br />

use database package and it brings necessary information from database and sends to GUI.<br />

Database package keeps the information that users want. In addition to it, if user wants to add a<br />

favorite to his application, that information is saved here.<br />

Package Decomposition<br />

GUI Package<br />

GUI Package provides interaction between application package and GUI package. It detects<br />

users’ desires to send application. GUI package contains two subsystems called Activities and<br />

GestureDedector.<br />

Activities: Our project is an Android application. In Android every screen that user will interact is a<br />

class called Activity. Activities subsystem will provide all necessary screens for users.<br />

GestureDedector: This application will be used in smart phones and input will not be given by a<br />

mouse or keyboard, input will be given by touch-operated screen and Gesture Dedector<br />

subsystem will realize the users’ touches.<br />

Application Package<br />

Manager: Manager will take the users’ demands from GUI package send desired data to GUI.<br />

7


Manager class will make some calculations like time and distance. This subsystem will need<br />

current location and station information. Manager will take current location from GPS subsystem<br />

and others from database.<br />

UpdateController: UpdateController will update GPS and Database to provide fresh information<br />

to Manager permanently. Therefore Manager can take current location from GPS correctly and<br />

users can see their movement on the map.<br />

GPS: GPS will provide freshness of information that Manager will use. It will be updated by<br />

UpdateController.<br />

Database Package<br />

DatabaseAdapter: This will connect Application and Database Package.<br />

Database: This component will keep all information that will be used probably and new<br />

information created by user will be saved here.<br />

8


3. Class Interfaces<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

Manager<br />

This class manages the whole system and main operations<br />

Manager<br />

vehicle : Vehicle<br />

dbManager: Database<br />

vList: VehicleList<br />

setNotification(notType) : void<br />

create and set the notification<br />

update():boolean<br />

update the datas<br />

getGPS(gpsType): GPS<br />

get the current gps data<br />

setStartLocation(loc):boolean<br />

set the start location<br />

getStartLocation(): String<br />

get the start location<br />

setFinishLocation():boolean<br />

set finish location<br />

setVehicleList():boolean<br />

set vehicle lists<br />

addVehicleList():boolean<br />

add a vehichle to vehicle list<br />

getVehicleList():VehicleList<br />

get the wanted vehicle list of route<br />

setVehicle():boolean<br />

set the vehicle<br />

setVehicleDetail():boolean<br />

take detais of the vehicles<br />

findRoute(): ArrayList<br />

find the route by using user instructions<br />

setRoute(): boolean<br />

set the route by user pereferences<br />

setVehicleID(): boolean<br />

get and set vehicle id to choose details of the vehicle<br />

calculateEfficiency(): int<br />

calculate efficiency of the routes<br />

getTemplateLocation(): arrayList<br />

get template location by using ArrayList fuction<br />

updateDatabase(): boolean<br />

update the database information<br />

9


CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

Vehicle<br />

Create and get details of vehicles<br />

Manager<br />

ID : int<br />

routes : ArrayList<br />

setID(ID) :boolean<br />

set id by using database info<br />

getID(): int<br />

get the id by using databes info<br />

setRoutes():boolean<br />

set the routes of the bus by using database info<br />

getRoutes(): ArrayList<br />

get routes of the list<br />

setStartTimes():boolean<br />

set start time of the bus<br />

getStartTimes():<br />

get start time of the bus<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

Efficiency<br />

Calculate efficiency of the routes<br />

Manager<br />

calculateTime() : int<br />

calculate time of the route<br />

calculateRoute() : int<br />

calculate route distance<br />

setBestRoute() : String<br />

set the best Route<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

VehicleList<br />

Get and take lists of vehicles<br />

Manager<br />

ID : Vehicle<br />

addVehicle() : boolean<br />

add new vehicle<br />

getVehicleList() : ArrayList<br />

get Vehicle list by ArrayList<br />

setVehicleList(): boolean<br />

set the Vehicle List<br />

getNextVehicle(): Vehicle<br />

get the next vehicle of choosen route<br />

10


CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

Notification<br />

Create and control the notifications of the system<br />

Manager<br />

notType : int<br />

setNotification() : boolean<br />

set the notification<br />

setNotificationType() : boolean<br />

set the notification type<br />

getNotification() : String<br />

get the notification<br />

GPS<br />

Determine and control the coordinates of the users and buses<br />

Manager<br />

x : int<br />

y : int<br />

determineCoordinates() : boolean<br />

determine coordinates of wanted location<br />

getCoordinate() : int<br />

get the current coordinates of wanted location<br />

setCoordinate(): boolean<br />

set the current coordinates of the wanted location<br />

update(): boolean<br />

update the wanted location<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

Updating<br />

This class aims to update the database data and current GPS data<br />

Manager<br />

updateDatabase() : boolean<br />

update the database information<br />

updateGps() : boolean<br />

update the GPS location<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

Template<br />

Get and set the templates of the most used routes<br />

Manager<br />

getTemplateList() : ArrayList<br />

get the template list of the routes<br />

addToList() : boolean<br />

add to list as template route<br />

11


CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

Activity<br />

This class aims to manage GUI and user pereferences of andriod system<br />

EGOActivity<br />

m : Manager<br />

onCreate() : void<br />

create the page<br />

onPause() : void<br />

click pause<br />

onResume() : void<br />

click resume<br />

onTouchEvent() : void<br />

determines the touched event on the screen<br />

setContentEvent() : void<br />

determines the user pereferences<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

RouteFinding<br />

This class aims to create and get the operations and route finding page<br />

design.<br />

EgoActivity<br />

Activity a<br />

onCreate() : void<br />

create the page<br />

onPause() : void<br />

click pause<br />

onResume() : void<br />

click resume<br />

onTouchEvent() : void<br />

determines the touched event on the screen<br />

setContentEvent() : void<br />

determines the user pereferences<br />

12


CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

RouteTemplate<br />

This class aims to create and get the operations and RouteTemplate page<br />

design.<br />

EgoActivity<br />

Activity a<br />

onCreate() : void<br />

create the page<br />

onPause() : void<br />

click pause<br />

onResume() : void<br />

click resume<br />

onTouchEvent() : void<br />

determines the touched event on the screen<br />

setContentEvent() : void<br />

determines the user pereferences<br />

DetailShowing<br />

This class aims to create and get the operations and DetailShowing page<br />

design.<br />

EgoActivity<br />

Activity a<br />

onCreate() : void<br />

create the page<br />

onPause() : void<br />

click pause<br />

onResume() : void<br />

click resume<br />

onTouchEvent() : void<br />

determines the touched event on the screen<br />

setContentEvent() : void<br />

determines the user pereferences<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

RouteShowing<br />

This class aims to create and get the operations and RouteShowing page<br />

design.<br />

EgoActivity<br />

Activity a<br />

onCreate() : void<br />

create the page<br />

onPause() : void<br />

click pause<br />

onResume() : void<br />

click resume<br />

onTouchEvent() : void<br />

determines the touched event on the screen<br />

setContentEvent() : void<br />

determines the user pereferences<br />

13


CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

CLASS :<br />

Description<br />

Package<br />

Attributes<br />

Operations<br />

RouteChecking<br />

This class aims to create and get the operations and RouteChecking page<br />

design.<br />

EgoActivity<br />

Activity a<br />

onCreate() : void<br />

create the page<br />

onPause() : void<br />

click pause<br />

onResume() : void<br />

click resume<br />

onTouchEvent() : void<br />

determines the touched event on the screen<br />

setContentEvent() : void<br />

determines the user pereferences<br />

Notification<br />

This class aims to create and get the operations and Notification page<br />

design.<br />

EgoActivity<br />

Activity a<br />

onCreate() : void<br />

create the page<br />

onPause() : void<br />

click pause<br />

onResume() : void<br />

click resume<br />

onTouchEvent() : void<br />

determines the touched event on the screen<br />

setContentEvent() : void<br />

determines the user pereferences<br />

4. Glossary<br />

Default Route: Default routes are options which were created before by us. They<br />

were created for end user to choose some frequently used routes such as airport to<br />

terminal. It can be useful for the end user for typing, searching and address mapping.<br />

Current location: Current location can be considered as a real time location of user.<br />

This information is provided by GPS to make whole program’s working principle<br />

easier.<br />

14


GPS: Global Positioning System is a satellite navigation system that provides an<br />

information about current location and current time.<br />

JDK7: Java Se Development Kit 7. It is a very useful development environment for<br />

creating applications.<br />

Android: It is Linux based operating system for touchscreen mobile devices which<br />

was created by Goggle.<br />

15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!