dvenus.50webs.comdvenus.50webs.com/object design document v3.docx · web viewobject design document...

24
Object Design Document For A police vehicle command and control system Barbara Anne Fernandiz WET060004 Girubalani a/p Garnarajan WEK060019 Patricia a/p Arokiasamy WEK060096 Subhashini a/p Ramalinggam WEK060105 Theresina a/p Anthony WEK060114 Munira Endok WEK060129

Upload: others

Post on 10-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

Object Design Document

For

A police vehicle command and control system

Barbara Anne Fernandiz WET060004 Girubalani a/p Garnarajan WEK060019 Patricia a/p Arokiasamy WEK060096 Subhashini a/p Ramalinggam WEK060105 Theresina a/p Anthony WEK060114 Munira Endok WEK060129

26/09/2008

Version 1.2

Table of Contents

Page 2: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

i. Document Status Sheet ii. Document Change Record

1. Introduction

1. Object design trade-offs 2. Interface documentation guidelines 3. Definitions, acronyms, and abbreviations 4. References

2. Packages 3. Class Interface 4. Glossary

DOCUMENT STATUS SHEET

Page 3: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

Document Title Object Design Document

Document Reference ID PCS-DV-ODD

Version Release Date Reason for change

1.0 1.1.0 22.09.2008 Creation of document

1.1 1.1.1 07.11.2008 Added the javadoc files

1.2 1.1.2 07.11.2008 edited the javadoc files

DOCUMENT RECORD CHANGE

Document record ID PCS-DV-ODD

Date 25.09.2008

Originator D’Venus

Approved By Barbara Anne Fernandiz

Document Title Police Vehicle Command and Control System

Document Reference ID PCS-DV-ODD

Document Version/Release 1.2

Page Section Reason for Change

7-10 Interface documentation guidelines

edited javadoc

1. Introduction

Page 4: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

1.1 Object design trade-offs

1. Throughput vs. Latency: Our project uses event based-control flow i.e. Web server allocates a new thread for each

request thereby allowing parallel handling of requests. This increases the throughput but checking overhead slows down.

2. Memory space vs. Response time:

Since our system focuses on providing fastest police service to the victims of any emergency incidents, response time is the most important factor and so more memory can be expended to speed up the software.

3. Functionality vs. Usability:

Our software incorporates functionalities which meets the requirement specification. With MYSQL server as database component, JavaScript as business object and PHP as front-end the usability of the system is fully achieved.

4. Efficiency vs. Portability:

The system is efficiently designed by which porting from one environment to another is made easy. With Java portability is much easier to support in various environment.

5. Cost vs. Reusability:

Our software interfaces & components can be reused within the system to implement the functionality for other modules but the software is designed using JavaScript for business logic & MYSQL Server for data access which is quite expensive compare to other data access tools.

1.2 Interface documentation guidelines

This section will give an insight about the Naming Convention to make the program more understandable by making them easier to read. First of all, we should know the rules of naming convention for each type of identifier as below: Identifier type: Packages Rules of naming:

The prefix of a unique package name is always written in capital and all lowercase ASCII letters except abbreviations like UI is User Interface so as not to make lengthy package name. Identifier type: Classes Rules of naming:

Class names should be nouns, in mixed case with the first letter of each internal word capitalized. Beside that, name of class also must be simple and descriptive. Some classes’ names also have numeral as it makes us to feel the step of execution.

Page 5: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

Identifier type: Interfaces Rules of naming:

Interface names should be capitalized like class names. Identifier type: Methods Rules of naming:

Method names should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized. Identifier type: Variables Rules of naming:

Except for variables, all instance, class, and class constants are in mixed case with a lowercase first letter. Internal words start with capital letters. Variable names has no start with underscore (“_”) or dollar sign (“$”) characters, even though both are allowed. Variable names are short yet meaningful. Identifier type: Constants Rules of naming:

The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores ("_"). (ANSI constants should be avoided, for ease of debugging.) Below is the table that defines the identifiers in Police Vehicle Command and Control System:

Identifier Type Police Vehicle Command and Control System

Packages package AmbulanceUI; package Dispatcher;

Classes class Call; class Caller; class CallOperator; class Personnel; class Incident; class Vehicle; class policeHeadquaters; class emergencyService; class emergencyServiceDepartment;

Interfaces interface DataInterface;

Page 6: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

Methods login(); logout(); makeCall(); receiveCall(); keyInIncidentReport(); verifyIncidentType(); verifyIncidentLocation(); verifyVehicle(); verifypersonnelToIncident(); 10.sendPersonnelToIncident(); 11.dispatchVehicleToIncident(); 12.receiveEmergencyAlert(); 13.dispatchEmergencyServices(); 14.getPersonnelHelp(); 15.receiveVehicle(); 16.receiveEmergencyServices(); 17.dispatchEmergencyServices();

Variables int numOfVehicleRequired; int noOfVehicle; long int callerPhoneNo; long int policeHeadquaterPhoneNo; char callID; char callerID; char incidentIdNo; char callOperatotIdNo; char personnelIdNo; 10.char vehicleIdNo; 11.char serviceIdNo; 12.char serviceDepartmentIdno; 13.char policeHeadquaterId; 14.char policeHID; 15.char callDate; 16.char callTime; 17.char vehicleType; 18.char serviceName; 19.char incidentTime; 20.string personnelName; 21.string callerName; 22.string callOperatorName; 23.string callerAddress 24.string typeOfIncident 25.string incidentLocation 26.string emergencyServiceNeedeed 27.string serviceDepartmentName 28.string serviceDepartmentAddress 29.string emergencyServiceAvaiable

Page 7: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

30.string policeHeadquatersName 31.string policeHeadquatersAddress

Constants static final int MIN_WIDTH = 4;

Table 1.0 Identifiers in the Police Vehicle Command and Control System

Call Class

/***<pre> Call made by caller which is received by the call operator</pre>*/public class Call {/**operator receives call and forward the call to the most available personnel* /private Caller make;*@param callId calls indentification number */*@param date case reported day */*@param time case reported period*/ private Call ( int callID, int date, int time);*@param callOpreatorIdNo call operator’s identification*/private CallOperator receive(String callOpreatorIdNo);

CallerOperator Class

/***<pre>operator successfully log into system</pre> */*@import java.util;*/

public class CallOperator{/** @ Operator searches and identify the most available personnel to pass the call */*@param name operator’s name*/*@param callOperatorIdNo operator’s Id*/public callCollection (int name, int callOperatorIdNo);public Personnel receive; /**@Routes call received */public void answerCall() {/** @ receives call from caller */throw new UnsupportedOperationException();}public void passCall() {/** @ passes the call to the most available operator */throw new UnsupportedOperationException();}

Page 8: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

}

Caller Class

/***@import java.util;*/

public class Caller {/**@caller’s call is successfully linked to the personnel who takes down the report*/*@param name caller’s name*/*@param callerID caller’s identification number*/*@param phoneNo caller’s contact number*/*@param address caller’s address*/public callMade (int name, int callerID, int phoneNo, String address);*@param incident reported*/public Collection<Incident> reported;*@param caller makes call*/public void makeCall() {/**@caller calls the emergency number*/throw new UnsupportedOperationException();}public void makeIndReport() {/**@ caller makes report*/throw new UnsupportedOperationException();}}

Personnel Class

/**personnel successfully log into system.*//** receives the call passed by the operator */

public class Personnel {

/** Records incident details made by caller */* @param NAME  name is a nonempty string */*@param name personnel’s name*/*@param personnelIdNo personnel’s Id*/public CallReceive ( int name, int personnelIdNo);*@prompt username and password for authentication*/public void login(String Username, String Password) {/**@ personnel logs into system with their unique username and password */

Page 9: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

throw new UnsupportedOperationException();}public void logout() {throw new UnsupportedOperationException();}public void receiveCall() {/**@ receives call from operator */throw new UnsupportedOperationException();}public void keyIncidentReport() {/**@ keys in the report as told by the caller */throw new UnsupportedOperationException();}public void verifyIncidentLocation() {/**@ verifies the incident location and searches for the nearest and most available police vehile with the location */throw new UnsupportedOperationException();}public void VerifyVehicle() {/**@ verifies the vehicle needed */throw new UnsupportedOperationException();}public void verifyPersonnelToIncident() {/**@ verify the police personnel assigned to the incident location */throw new UnsupportedOperationException();}}

Incident Class

/***@import java.util;*/

public class Incident {/**@personnel keys in the information about the incident provided by the caller*/*@param incidentIdNo case identification number*/*@param typeOfIncident incident’s type*/*@param location incident’s location*/*@param time occurrence of incident’s time */*@param numOfVehicleRequired number of vehicle required*/

Page 10: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

*@param emergencyServiceNeeded number of emergency service required*/

public CallReceive(int incidentIdNo, int typeOfIncident, int location, int time, int numOfVehicleRequired, int emergencyServiceNeeded);public Collection<vehicle> use;private Collection<emergencyService> need;

public void getPersonnelHelp() {/**@call parsed by operator to the personnel, personnel then keys in the information into the database*/throw new UnsupportedOperationException();}public void receiveVehicle() {/**@the personnel determines which and what vehicle is needed and dispatches it the the incident location.*/throw new UnsupportedOperationException();}public void receiveEmergencyServices() {/**@personnel then determine if other emergency services is needed.*/throw new UnsupportedOperationException();}}

policeHeadquarters Class/***@import java.util;*/public class policeHeadquarters {/**@ sends information to the police headquarters*/private Collection<vehicle> owned;*@param name police’s name*/*@param policeHID police’s identification number*/*@param phoneNo police’s contact number*/*@param address police’s address*/

public caseInformation( int name,int policeHID, int phoneNo,int address);

public void sendPersonnelToIncident() {/**@sends the nearest and most available personnel to the incident location*/throw new UnsupportedOperationException();}public void dispatchVehicleToIncident() {/**@ sends the most appropriateand most available vehicle to the incident location*/

Page 11: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

throw new UnsupportedOperationException();}}emergencyServiceDepartment Class/***@import java.util;*/public class emergencyServiceDepartment {/**@ alerts other emergency service department*/private Collection<emergencyService> provided;*@param departmentName department’s name*/*@param departmentNo department’s number*/*@param address department’s address*/*@param servicesAvailable number of service available*/

public department( int departmentName, int departmentNo, int address, int servicesAvailable);

public void receivesEmergencyAlert() {/**@ alert other emergency services if there is a need*/throw new UnsupportedOperationException();}public void dispatchEmergencyServices() {/**@ dispatch emergency services*/throw new UnsupportedOperationException();}}

emergencyService Class/***@import java.util;*/public class emergencyService {/**@ determine if any other emergency services is needed */private Collection<Incident> need;*@param serviceName service’s name*/*@param serviceNo service identification number*/public emergencyService(int serviceName, int serviceNo);private Collection<emergencyServiceDepartment> provide;

public void dispatchEmergencyServices() {/**@ sends incident information to the other emergency services that will alert other emergency services to send the required amount of vehicles and personnel to the incident location*/ throw new UnsupportedOperationException();}

Page 12: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

}

Vehicle Classpublic class vehicle {/** @ checks the type of vehicle needed and the location of the incident to determine the no of vehicle and the nearest most available vehicle to be sent to the location */*@param type vehicle’s type*/*@param vehicelIdNo vehicle’s identification number*/*@param policeHID police identification number*/*@param noOfVehicle number of vehicle available*/*@param policeHeadquartersHave service’s name*/

public IncidentNeed( int type, int vehicelIdNo, int policeHID, int noOfVehicle, policeHeadquartersHave); (is the highlighted term correct)}

1.3 Definitions, acronyms, and abbreviations

GPS Global Positioning System GUI Graphical User Interface RAD Requirements Analysis Document SDD System Design Document ODD Object Design Document UML Unified Modeling Language

1.4 References 1. Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering: Using UML, Patterns, and Java. Prentice Hall.

2. Packages

Package Diagram

Page 13: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

CCinterface

PersonnelLoginEmergencyCase

Vehicle InformationReport

HandleIncident

Database (Tables)

CCinterface

CCClasses

Package Diagram of the CC Module

CCinterface (command and control interface) Package In this part, the police command and control system is delivered in units called packages. A

package is a collection of files and directories that are required for a software product. Therefore, the police command and control system is also broken down into packages. The packages are including CCinterface (command and control interface) and CCClasses (command and control classes). This system’s user interfaces (CCinterface) will be web pages and there aren’t any classes created for the user interface. CCClasses (command and control classes) Package

A police vehicle command and control system is composed of important and main subsystems which are called classes of the package CCClasses (command and control classes).. In accordingly, the main subsystems that form the system are personnelLogin system, reportDetails system, vehicleInfo system, emergencyAlert system and trackVehicle system.

Overall, the police vehicle and command system is being handled and operated by police personnel in the operation hour. Thus, the personnel in duty are required to login in order to enter the system. Therefore, personnelLogin system is required to perform this task. This subsystem offers an

Page 14: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

interface to the other modules or subsystems of the project to log the users into the system and perform necessary responsibilities.

The system should allow details of the reporter of incidents to be logged. Therefore, reportDetails system is essential to allow police personnel to key in the reported information or written report as well as the reporter’s details. The system provides an interface that should allow the user to enter information about a report, and performs necessary command and control operations. Besides that, some incidents are more serious than others and require a more urgent response. Therefore the system’s interface will classify the response and incidents allocated to these classes accordingly. Subsequently, the vehicleInfo is a very important subsystem in the police vehicle command and control system. This is because this subsystem is responsible to keep on moving forward and highlight the type and total of vehicles available accordingly. The information being showed up must be up to date. Some incidents require a number of vehicles, others such as traffic accidents, may require specialized vehicles and so on. Thus, the up to date information about the vehicles are essential as this subsystem play an important role.

Whereas, the trackVehicle subsystem is also vital in order to identify the position of available vehicles. In general, the best strategy is to send the closest vehicle to respond to an incident. Therefore, the personnel need to take into account that the position of vehicles may not be known exactly and it may be necessary to send a message to vehicles to determine their current position. Thus, this subsystem must flexible to track the position of the nearest vehicle to reported incident. The system must show an interface to command and control the vehicle identified to take further action.

The next main subsystem is emergencyAlert. Previously, it was stated that the respond is classified according to the level of seriousness of the incident reported. Therefore, the respond may require an action of alerting other emergency services such as fire and ambulance services. The system should automatically alert these services if necessary. The system interface should be compatible and well-built because the respond will be sent through a server to the fire and ambulance services. Thus, the server performance must be high and speed all the time in order to act quickly to the reported incident.

Database The police command and control system has a structured collection of records or data that is stored in a computer system. It contains tables of the important classes that is structured which is achieved by organizing the data accordingly. 3. Class Interface Class Interface

A class interface is a specification of the methods that are visible and can be used by instances in an application. This provides an external view that enables a programmer to understand and use the objects. The Police Command and Control system class interface is designed based on this concept. The purpose of the interface of the Police Command and Control system module is to provide necessary services to other module. The police command and control system will have several class interfaces which interact with the system. This class interfaces are as described below:-

Page 15: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

Personnel Login Interface

The interface is designed as a class named Personnel Login Interface and the provided operations are the methods of this class. It is responsible for checking the password associated with a particular username for authentication in the login process. The method, checkPassword, searches the “PersonnelPassword” table of the database in order to verify the existence of the password and returns TRUE if the entry is present in the table, and FALSE otherwise. The methods, Class_Initialize and Class_Terminate are responsible for the initialization and termination of the class, respectively. They create and destroy the database connection and record set objects. EmergencyCase

The class EmergencyCase is used to refer the type of the emergency that is already in the

database and to create new cases that need to be stored inside the database. There are two types of variables which handle the EmergencyCase; TypeOfIncident indicates the incident type while the caseID shows a code of integer number assign to the related type of cases. The method

PersonnelLogin Interface

-Username: String

-Password: String

-checkPassword: (username: String, password: String): Boolean

+Class_Initialize ()

+ Class_Terminate ()

Page 16: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

setTypeOfIncident () is used to set the type of emergency cases indicated by the user and setCaseID() will handle code ID inserted for the specify cases. While the getTypeOfIncident() and getcaseID() is used to access by handleIncident class to verify the incident lodged. TrackVehicle

The HandleIncident is used to handle the Incident reported. The four variable caseID(integer data type), numberOfVehicles(integer data type) , TypeOfVehicle (string data type) and TypeOfIncident (string data type) is used to handle the event. The getcaseID() method is used to track the code of the incident to the corresponding emergency type which is entered by the user. The number of vehicles and type of vehicles needed to handle the incident will be assign using setNumberOfVehicles () and setTypeOfVehicle() methods and the data will be access using the getNumberOfVehicles () and getTypeOfVehicle() methods.

Report Interface

Page 17: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

The interface is designed as a class named Report Interface and the provided operations are

the methods of this class. It is responsible for storing reported incidents. The method, saveDetails store the incidents details in table “Incident” of the database as a record. The method, refresh will refresh the entire page, thus it will clear data in the fields as the button is excuted. This method eases personnel when the system hangs. The method getVehicleInfo is responsible for routing from current interface to the vehicle information interface. It is performed via submit button.

Vehicle Information Interface

Page 18: dvenus.50webs.comdvenus.50webs.com/Object Design Document V3.docx · Web viewObject Design Document . For . A police vehicle command and control system . Barbara Anne Fernandiz

The interface is designed as a class named Vehicle Information Interface and the provided

operations are the methods of this class. It is responsible for searching appropriate vehicle based on the reported incidents. The method, search, searches the “Vehicle” table of the database in order to verify the availability of vehicle based on query entered. The method, refresh will refresh the entire page, thus it will clear data in the fields as the button is excuted. This method eases personnel to search for more vehicles easily. The getGPS method will generate Geographical Position System (GPS) to determine the closest vehicle available to the reported incident. This ensures the vehicle is routed quickly.

The getAlert method will retrieve incident details from “Incident” table of the database and will route the information to the emergency services via server. Therefore emergency services will be able to route vehicle to the reported incident without any further delay. 4. Glossary Class An abstraction of a set of objects with the same attributes operations, relationships and semantics. Class Diagram UML notation representing the structure of the system in terms of objects, classes, attributes operations and associations. Class diagrams represent object model during development. Package A UML grouping concept denoting that a set of objects or classes are related. Interface Defines the communication boundary between two entities, such as a piece of software. This separates the methods of external communication from internal operation, and allows it to be internally modified without affecting the way outside entities interact with it, as well as provide multiple abstraction of itself.