Chapter - 1: Inroduction
Chapter - 1: Inroduction
INRODUCTION
1
INTRODUCTION
This system is very useful for automatic vehicle tracking, time management and
also for automation of Toll gate. This project explains the implementation of Toll
Gate Automation which is a step of monitoring of vehicles, traveling in
predetermined routes.
Then this information about the source (vehicle) is displayed and Toll is deducted
and stored for future use. But this system does not make toll collection completely
automatic when there is need of recharging the user’s account. Hence, in order to
make toll collection system completely automatic and to avoid corruption at Toll
Plazas some unique
2
Chapter -2
PROBLEM DEFINITION
3
PROBLEM DEFINITION
First is the traditional manual method where one person collects the money and
issues a receipt. There are two ways of collecting toll tax being in practice at
present. other is two way receipt exists for 24 hours
The other one is Smart Card system where the person needs to show the smart
card to the system installed at the toll tax depot to open the barrier
.
2.2 Proposed System
Each vehicle will be provided by an RF TX tag containing a unique ID. When the
vehicle will reach at the toll booth the RF receiver will detect these RF signals.
The signals are amplified and are passed to microcontroller. Now, with the help of
PC interface unit the data collected is passed to PC through serial port.
Software developed will show all the details about the vehicle on the screen.
Details like date time and id will be stored in the access database. Microcontroller
will check whether the user is valid or not, if valid the microcontroller will
intimate the gate control which is supported by a stepper motor.
Advantages:
• This system is very useful for automatic vehicle tracking, time management and
also for automation of Toll gate.
• This project explains the implementation of Toll Gate Automation which is a step
of monitoring of vehicles, traveling in predetermined routes.
4
MODULES:
Admin:
Registration of owner:
Automation of toll gate records the time and the details like Owner’s name, date of
registration, vehicle model
Track details:
Search:
5
Chapter -3
6
FEASIBILITY STUDY:
Technical feasibility
Operational feasibility
Economical feasibilty
7
web is incomprehensible today. That goes to proposed system is technically
feasible.
8
HARDWARE AND SOFTWARE REQUIREMENTS
Hardware Requirements
Processor : Dual Core
Ram : 1GB (or) Higher
Hard disk : 160GB
Software Requirements
9
Chapter – 4
SYSTEM ANALYSIS
10
SYSTEM ANALYSIS
1) Problem/Requirement Analysis:
2) Requirement Specification:
11
The Requirement phase terminates with the production of the
validate SRS document. Producing the SRS document is the basic
goal of this phase.
ROLE OF SRS
The purpose of the Software Requirement Specification is to
reduce the communication gap between the clients and the
developers. Software Requirement Specification is the medium
though which the client and user needs are accurately specified. It
forms the basis of software development. A good SRS should
satisfy all the parties involved in the system.
SCOPE
12
Chapter -5
SYSTEM DESIGN
13
SYSTEM DESIGN
SOFTWARE DESIGN
separate function.
14
2. Coupling: modules should have little dependence on other modules of a
system.
UML Concepts
15
There are four kinds of things in the UML:
Structural things
Behavioral things
Grouping things
Annotational things
Structural things are the nouns of UML models. The structural things used in the project
design are:
First, a class is a description of a set of objects that share the same attributes, operations,
relationships and semantics.
Window
origin
size
open()
close()
move()
display()
Fig: Classes
Second, a use case is a description of set of sequence of actions that a system performs
that yields an observable result of value to particular actor.
Third, a node is a physical element that exists at runtime and represents a computational
resource, generally having at least some memory and often processing capability.
16
Fig: Nodes
Behavioural things are the dynamic parts of UML models. The behavioural thing used
is:
Interaction:
An interaction is a behaviour that comprises a set of messages exchanged among a set of
objects within a particular context to accomplish a specific purpose. An interaction
involves a number of other elements, including messages, action sequences (the
behaviour invoked by a message, and links (the connection between objects).
Fig: Messages
5.1.3 Relationships in the UML:
Fig: Dependencies
17
An association is a structural relationship that describes a set links, a link being a
connection among objects. Aggregation is a special kind of association, representing a
structural relationship between a whole and its parts.
Fig: Association
Fig: Generalization
Fig: Realization
Sequence Diagrams:
UML sequence diagrams are used to represent the flow of messages, events and actions
between the objects or components of a system. Time is represented in the vertical
direction showing the sequence of interactions of the header elements, which are
displayed horizontally at the top of the diagram.
Sequence Diagrams are used primarily to design, document and validate the architecture,
interfaces and logic of the system by describing the sequence of actions that need to be
performed to complete a task or scenario. UML sequence diagrams are useful design
tools because they provide a dynamic view of the system behaviour which can be
difficult to extract from static diagrams or specifications.
18
Actor
Represents an external person or entity that interacts with the system
Object
Represents an object in the system or one of its components
Unit
Represents a subsystem, component, unit, or other logical entity in the system (may or
may not be implemented by objects)
Separator
Represents an interface or boundary between subsystems, components or units (e.g., air
interface, Internet, network)
Group
Groups related header elements into subsystems or components
19
Sequence Diagram Body Elements
Action
Represents an action taken by an actor, object or unit
Asynchronous Message
Block
A block representing a loop or conditional for a particular header element
Call Message
A call (procedure) message between header elements
Create Message
20
A "create" message that creates a header element (represented by lifeline going from
dashed to solid pattern)
Diagram Link
Represents a portion of a diagram being treated as a functional block. Similar to a
procedure or function call that abstracts functionality or details not shown at this level.
Can optionally be linked to another diagram for elaboration.
Message
Return Message
21
a:admin t:tracker s:search v:vowner d:database
registerowner
added
submitdocuments
verifydoc
accept owner
trackvehicle details
pay money
view plans
22
Use Case Diagram
A use case diagram is a graph of actors set of use cases enclosed by a system boundary,
communication associations between the actors and users and generalization among use
cases. The use case model defines the outside(actors) and inside(use case) of the system’s
behavior.
use case diagram is quite simple in nature and depicts two types of elements: one
representing the business roles and the other representing the business processes.
Use case: A use case in a use case diagram is a visual representation of a distinct
business functionality in a system. The key term here is "distinct business functionality."
To choose a business process as a likely candidate for modelling as a use case, you need
to ensure that the business process is discrete in nature.
As the first step in identifying use cases, you should list the discrete business functions
in your problem statement. Each of these business functions can be classified as a
potential use case. Remember that identifying use cases is a discovery rather than a
creation. As business functionality becomes clearer, the underlying use cases become
more easily evident. A use case is shown as an ellipse in a use case diagram (see Figure
3.2).
23
Figure 3.2: use cases in a use case diagram
Figure 3.2 shows two uses cases: "Make appointment" and "Perform medical tests" in the
use case diagram of a clinic system. As another example, consider that a business process
such as "manage patient records" can in turn have sub-processes like "manage patient's
personal information" and "manage patient's medical information." Discovering such
implicit use cases is possible only with a thorough understanding of all the business
processes of the system through discussions with potential users of the system and
relevant domain knowledge.
register
login
submitvdetails
paymoney
owner
admin
viewUsers
submitdocuments
recordownerdetails
viewdetails
trackvehicledetails
verifyvalidity verifydetails
<<include>>
viewvehiclevalidity
deductamount
24
Activity Diagram
Activity Diagram:
Initial Activity: This shows the starting point or first activity of the flow. Denoted by a
solid circle. This is similar to the notation used for Initial State.
25
Activity: Represented by a rectangle with rounded (almost oval) edges.
.
Decisions: Similar to flowcharts, a logic where a decision is to be made is depicted by a
diamond, with the options written on either sides of the arrows emerging from the
diamond, within box brackets.
Signal: When an activity sends or receives a message, that activity is called a signal.
Signals are of two types: Input signal (Message receiving activity) shown by a concave
polygon and Output signal (Message sending activity) shown by a convex polygon.
26
Final Activity: The end of the Activity diagram is shown by a bull's eye symbol, also
called as a final activity.
Admin:
27
Vehicle Owner:
vehicleowner
submitdocuments
viewplans paymoney verifydetails checkvalidity
Class Diagram
An object is any person, place, thing, concept, event, screen, or report applicable
to your system. Objects both know things (they have attributes) and they do things (they
have methods).
28
Class diagram
Admin vehicleOwner
+uname +name
+password +password
+trackVehicleDetails() +address
+findVehicleMovement() +phoneno
+recordOwnerDetails() +dateofRegistration
+viewRegistration() +vehicleModel
+viewVehicleModel() +emailid
+vehicleno
+payMoney()
+submitDetails()
+viewDetails()
+verifyDetails()
TrackDetails
Search
+id
+name +name
+password +id Vehicle
+location +date
+date +time +vno
+time +location +vname
+vmodel
+trackDetails() +searchVehicle() +regdetails
+deductAmount() +submitDetails() +vowner
+verifyValidity() +cardno
+sendMails()
Responsibilities
Classes are typically modeled as rectangles with three sections: the top section for the
name of the class, the middle section for the attributes of the class, and the bottom section
for the methods of the class. Attributes are the information stored about an object, while
methods are the things an object or class do. For example, students have student numbers,
names, addresses, and phone numbers. Those are all examples of the attributes of a
student. Students also enroll in courses, drop courses, and request transcripts. Those are
all examples of the things a student does, which get implemented (coded) as methods.
You should think of methods as the object-oriented equivalent of functions and
procedures.
Object diagram
29
An Object diagram focuses on some
particular set of object instances and attributes, and the links between the instances.
A correlated set of object diagrams provides insight into how an arbitrary view of a
system is expected to evolve over time. Object diagrams are more concrete than class
diagrams, and are often used to provide examples, or act as test cases for the class
diagrams. Only those aspects of a model that are of current interest need be shown on an
object diagram.
Deployment Diagram
Deployment diagrams are used to visualize the topology of the physical components of a
system where the software components are deployed.
So deployment diagrams are used to describe the static deployment view of a system.
Deployment diagrams consist of nodes and their relationships.
The name Deployment itself describes the purpose of the diagram. Deployment diagrams
are used for describing the hardware components where software components are
deployed.
Deployment Diagram
30
client
databaseserver
webbrowser
applicationserver
Component Diagram
31
admin owner
vehiclesearch
database
tracker
32
5.2INPUT/OUTPUT DESIGN
Output design: All the screens of the system are designed with a
view to provide the user with easy operations in simpler and efficient
way, minimum key strokes possible. Instructions and important
information is emphasized on the screen. Almost every screen is
provided with no error and important messages and option
selection facilitates. Emphasis is given for speedy processing and
speedy transaction between the screens. Each screen assigned to make
it as much user friendly as possible by using interactive procedures.
So to say user can operate the system without much help from the
operating manual.
33
Chapter -6
IMPLEMENTATION
34
OVERVIEW OF SOFTWARE DEVELOPMENT
TOOLS
6.1 HTML
TABLE:
Tables are so popular with web page authors is that they let you arrange the
elements of a web page in such a way that the browser won’t rearrange them
web page authors frequently use tables to structure web pages.
TR:
TR is used to create a row in a table encloses <TH> and
<TD> elements. <TR> contain many attributes. Some of them are,
ALIGN: specifies the horizontal alignment of the text in the table row.
BGCOLOR: Specifies the background color for the row.
BORDERCOLOR: Sets the external border color for the row.
VALIGN: Sets the vertical alignment of the data in this row.
35
TH:
TH is used to create table heading.
ALIGN: Sets the horizontal alignment of the content in the table cell.
Sets LEFT, RIGHT, CENTER.
BACKGROUND: Species the back ground image for the table cell.
BGCOLOR: Specifies the background color of the table cell
VALIGN: Sets the vertical alignment of the data. Sets to TOP,
MIDDLE, BOTTOM or BASELINE.
WIDTH: Specifies the width of the cell. Set to a pixel width or a
percentage of the display area.
TD:
TD is used to create table data that appears in the cells of a
table.
ALIGN: Species the horizontal alignment of content in the table cell.
Sets to LEFT, CENTER, RIGHT.
BGCOLOR: Specifies the background image for the table cell.
BGCOLOR: sets the background color of the table cells.
WIDTH: Species the width of the cell
FRAMES:
Frames are used for either run off the page or display only small
slices of what are supposed to be shown and to configure the frame we can
use <FRAMESET>There are two important points to consider when
working with <FRAMESET>.
<FRAMESET> element actually takes the place of the <BODY>
element in a document.
Specifying actual pixel dimensions for frames .
36
<FRAME> Elements are used to create actual frames.
From the frameset point of view dividing the browser into tow vertical
frames means creating two columns using the <FRAMESET> elements
COLS attribute.
The syntax for vertical fragmentation is,
<FRAMESET COLS =”50%, 50%”>
</FRAMESET>
Similarly if we replace COLS with ROWS then we get horizontal
fragmentation.
The syntax for horizontal fragmentation is,
<FRAMESET ROWS=”50%, 50%”>
</FRAMESET>
FORM:
The purpose of FORM is to create an HTML form; used
to enclose HTML controls, like buttons and text fields.
ATTRIBUTES:
ACTION: Gives the URL that will handle the form
data.
37
Using the POST method, the content of the form are encoded as with
the GET method, but are sent in environment variables.
CONTROLS IN HTML
<INPUT TYPE=RADIO>:
Creates a radio button in a form.
ATTRIBUTE:
NAME: Gives the element a name. Set to alphanumeric character.
VALUE: Sets the default content of the element.
<INPUT TYPE=SUBMIT>:
Creates a submit button that the user can click to send data in the form
back to the web server.
38
ATTRIBUTES:
NAME: Gives the element a name. Set to alphanumeric characters.
VALUE: Gives this button another label besides the default, Submit Query.
Set to alphanumeric characters.
<INPUT TYPE=TEXT>:
Creates a text field that the user can enter or edit text in.
ATTRIBUTES:
NAME: Gives the element a name. Set to alphanumeric characters.
VALUE: Holds the initial text in the text field. Set to alphanumeric
characters.
39
6.2 JAVA SCRIPT
Java script originally supported by Netscape navigator is the
most popular web scripting language today. Java script lets you
embedded programs right in your web pages and run these programs
using the web browser. You place these programs in a <SCRIPT>
element, usually within the <HEAD> element. If you want the script
to write directly to the web page, place it in the <BODY> element.
JAVASCRIPT METHODS:
Writeln:
[Link]() is a method, which is used to write some text to
the current web page.
onClick:
Occurs when an element is clicked.
onLoad:
Occurs when the page loads.
onMouseDown:
Occurs when a mouse button goes down.
onMouseMove:
Occurs when the mouse moves.
onUnload:
Occurs when a page is unloaded.
40
6.3 MySql
JDBC DRIVERS:
The JDBC API only defines interfaces for objects used for
performing various database-related tasks like opening and
closing connections, executing SQL commands, and retrieving the
results. We all write our programs to interfaces and not
implementations. Either the resource manager vendor or a third
party provides the implementation classes for the standard JDBC
interfaces. These software implementations are called JDBC drivers.
JDBC drivers transform the standard JDBC calls to the external
resource manager-specific API calls. The diagram below depicts
how a database client written in java accesses an external resource
manager using the JDBC API and JDBC driver:
41
Depending on the mechanism of implementation, JDBC drivers are broadly
classified into four types.
TYPE1:
Type1 JDBC drivers implement the JDBC API on top of a
lower level API like ODBC. These drivers are not generally
portable because of the independency on native libraries. These
drivers translate the JDBC calls to ODBC calls and ODBC sends the
request to external data source using native library calls. The
JDBC-ODBC driver that comes with the software distribution for J2SE
is an example of a type1 driver.
TYPE2:
Type2 drivers are written in mixture of java and native code.
Type2 drivers use vendors specific native APIs for accessing the
data source. These drivers transform the JDBC calls to vendor specific
calls using the vendor’s native library.
These drivers are also not portable like type1 drivers because
of the dependency on native code.
TYPE3:
Type3 drivers use an intermediate middleware server for
accessing the external data sources. The calls to the middleware
server are database independent. However, the middleware
server makes vendor specific native calls for accessing the data
source. In this case, the driver is purely written in java.
42
TYPE4:
Type4 drivers are written in pure java and implement
the JDBC interfaces and translate the JDBC specific calls to vendor
specific access calls. They implement the data transfer and network
protocol for the target resource manager. Most of the leading
database vendors provide type4 drivers for accessing their database
servers.
43
[Link]:
MANAGING DRIVERS:
MANAGING CONNECTION:
DriverManager class is responsible for managing connections
to the databases:
44
public static Connection getConnection (String url,Properties info)
throws SQLException
This method gets a connection to the database by the specified
JDBC URL using the specified username and password. This method
throws an instance of SQLException if a database access error occurs.
CONNECTIONS:
CREATING STATEMENTS:
The interface [Link] defines a set of methods for
creating database statements. Database statements are used for sending SQL
statements to the database:
Public Statement createStatement () throws SQLException
45
This method is used for creating instances of the interface
[Link]. This interface can be used for sending SQL statements to
the database. The interface [Link] is normally used for sending
SQL statements that don’t take any arguments. This method throws an
instance of SQLException if a database access error occur:
Public Statement createStatement (int resType, int resConcurrency)
throws SQLException.
JDBC RESULTSETS:
SCROLLING RESULTSETS:
46
ACCESSING RESULTSET DATA:
public String getString (int I) Gets the data in the specied column as
a string.
STATEMENT:
47
Handling SQL batches
Other miscellaneous methods
DriverManager
Driver Driver
Layer
Application
Layer Connection
48
6.4 JAVA SERVER PAGES (JSP)
INTRODUCTION:
Java Server Pages (JSP) technology enables you to mix regular, static
HTML with dynamically generated content. You simply write the regular
HTML in the normal manner, using familiar Web-page-building tools. You
then enclose the code for the dynamic parts in special tags, most of which
start with <% and end with %>.
BENEFITS OF JSP:
JSP provides the following benefits over servlets alone:
It is easier to write and maintain the HTML: In this no extra
backslashes, no double quotes, and no lurking Java syntax.
You can use standard Web-site development tools:
We use Macromedia Dreamweaver for most of the JSP pages.
Even HTML tools that know nothing about JSP can used because they
simply ignore the JSP tags.
You can divide up your development team:
49
The Java programmers can work on the dynamic code.
The Web developers can concatenate on the representation layer.
On large projects, this division is very important. Depending
on the size of your team and the complexity of your project, you
can enforce a weaker or stronger separation between the static
HTML and the dynamic content.
50
TYPES OF JSP SCRIPTING ELEMENTS:
JSP scripting elements allow you to insert Java code into the servlet
that will be generated from the JSP page. There are three forms:
A JSP element is used to insert values directly into the output. It has
the following form:
<%= Java Expression %>
The expression is evaluated, converted to a string, and inserted in the
page. This evaluation is performed at runtime (when the page is
requested) and thus has full access to the information about the request.
For example, the following shows the date/time that the page was
requested.
Current time: <%=new [Link] () %>
51
PREDEFINED VARIABLES:
To simplify expressions we can use a number of predefined variables (or
“implicit objects”). The specialty of these variables is that, the system
simple tells what names it will use for the local variables in _jspService.The
most important ones of these are:
request, the HttpServletRequest.
response, the HttpServletResponse.
session, the HttpSession associated with the request
out, the writer used to send output to clients.
application, the ServletContext. This is a data structure shared by all
servlets and JSP pages in the web application and is good for storing
shared data.
Here is an example:
52
WRITING SCRIPTLETS
If you want to do something more complex than output the value of a
simple expression .JSP scriptlets let you insert arbitrary code into the
servlet’s _jspService method. Scriptlets have the following form:
<% Java code %>
Scriptlets have access to the same automatically defined variables as do
expressions (request, response, session, out , etc ) .So for example you want
to explicitly send output of the resultant page , you could use the out
variable , as in the following example:
<%
String queryData = [Link] ();
[Link] (“Attached GET data: “+ queryData);
%>
SCRIPTLET EXAMPLE:
As an example of code that is too complex for a JSP expression alone,
a JSP page that uses the bgColor request parameter to set the background
color of the page .Simply using
<BODY BGCOLOR=”<%= [Link] (“bgcolor”) %> “>
would violate the cardinal rule of reading form data.
USING DECLARATIONS
A JSP declaration lets you define methods or fields that get inserted
into the main body of the servlet class .A declaration has the following form:
<%! Field or Method Definition %>
Since declarations do not generate output, they are normally used in
conjunction with JSP expressions or scriptlets. In principle, JSP declarations
53
can contain field (instance variable) definitions, method definitions, inner
class definitions, or even static initializer blocks: anything that is legal to put
inside a class definition but outside any existing methods. In practice
declarations almost always contain field or method definitions.
We should not use JSP declarations to override the standard servlet life cycle
methods. The servlet into which the JSP page gets translated already makes
use of these methods. There is no need for declarations to gain access to
service, doget, or dopost, since calls to service are automatically dispatched
to _jspService , which is where code resulting from expressions and
scriptlets is put. However for initialization and cleanup, we can use jspInit
and jspDestroy- the standard init and destroy methods are guaranteed to call
these methods in the servlets that come from JSP.
6.5Apache Tomcat
Apache Tomcat is a web [Link] is the Servlet/JSP container
that implements the Servlet 2.4 and JavaServer Pages 2.0 specification. It
also includes many additional features that make it a useful platform for
developing and deploying web applications and web services.
TERMINOLOGY:
Context – a Context is a web application.
$CATALINA_HOME – This represents the root of Tomcat
installation.
DIRECTORIES AND FILES:
/bin – Startup, shutdown, and other scripts. The *.sh files (for Unix
systems) are functional duplicates of the *.bat files (for Windows systems).
54
Since the Win32 command-line lacks certain functionality, there are some
additional files in here.
/conf – Configuration files and related DTDs. The most important file
in here is [Link]. It is the main configuration file for the container.
INSTALLATION:
Tomcat will operate under any Java Development Kit (JDK)
environment that provides a JDK 1.2 (also known as Java2 Standard
Edition, or J2SE) or later platform. JDK is needed so that servlets, other
classes, and JSP pages can be compiled.
Main Location
$CATALINA_HOME/webapps/ROOT
Corresponding URLs.
[Link]
[Link]
55
More Specific Location (Arbitrary Subdirectory).
$CATALINA_HOME/webapps/ROOT/SomeDirectory
Corresponding URLs
[Link]
[Link]
Location
$CATALINA_HOME/webapps/ROOT/WEB-INF/lib
56
Chapter -7
TESTING
57
SOFTWARE TESTING
Testing
Software testing is a critical element of software quality assurance and
represents the ultimate review of specification, design and code generation.
58
testing until all the errors are removed. A successful test is one that uncovers
an as yet undiscovered error.
Note that the result of the system testing will prove that the system is
working correctly. It will give confidence to system designer, users of the
system, prevent frustration during implementation process etc.,
59
Unit Testing:
Unit testing is essentially for the verification of the code
produced during the coding phase and the goal is test the internal logic
of the module/program. In the Generic code project, the unit testing is
done during coding phase of data entry forms whether the functions are
working properly or not. In this phase all the drivers are tested they are
rightly connected or not.
Integration Testing:
All the tested modules are combined into sub systems, which are
then tested. The goal is to see if the modules are properly integrated,
and the emphasis being on the testing interfaces between the modules.
In the generic code integration testing is done mainly on table creation
module and insertion module.
Validation Testing
60
Implementing the system in a simulated production environment and
testing it.
Introducing errors and testing for error handling.
61
TEST CASE 1 :
TEST CASE 2:
TEST CASE 3 :
When the old password does not match with the new password, then
this results in displaying an error message as “OLD PASSWORD
DOES NOT MATCH WITH THE NEW PASSWORD”.
TEST CASE 4 :
When a user forgets his password he is asked to enter Login name, ZIP code,
Mobile number. If these are matched with the already stored ones then user
will get his Original password.
62
Chapter – 8
OUTPUT SCREENS
63
OUTPUT SCREENS
64
Toll Gate Station:
65
Central Station:
66
CONCLUSION
67
APPENDIX
ABBREVATIONS:
FAQ’S
In general, the <script> container tags may appear any where with in
the html document. It is more viable to have the tags placed with in the
<head> container.
68
BIBILIOGRAPHY
Websites
[Link]
[Link]
[Link]
[Link]
69