13
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.0

For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

Embed Size (px)

Citation preview

Page 1: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

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.0

Page 2: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

Table of Contents

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

Page 3: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

DOCUMENT STATUS SHEET Document Title Document Reference ID Version Release Date Reason for change

DOCUMENT RECORD CHANGE

Document record ID Date Originator Approved By Document Title Document Reference ID Document Version/Release Page Section Reason for Change

Page 4: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

1. Introduction 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: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

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; Methods login();

logout(); makeCall(); receiveCall(); keyInIncidentReport(); verifyIncidentType(); verifyIncidentLocation();

Page 6: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

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 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

Page 7: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

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 8: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

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 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

Page 9: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

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:- Login Interface

The interface is designed as a class named 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.

Page 10: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

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 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. HandleIncident

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

Page 11: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

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

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.

Page 12: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering:

Vehicle Information Interface

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.

Page 13: For A police vehicle command and control systemdvenus.50webs.com/Object Design Document.pdf ·  · 2008-09-26Bernd, B., & Allen, D. (2003). Object-Oriented Software Engineering: