Vous êtes sur la page 1sur 74

Abstract

Over the last few years, the mobile and wireless market has been one of the fastest
growing markets in the world and it is still growing at a rapid pace. With mobile
technology, banks can offer a wide range of services to their customers such as balance
enquiry, mini statement, cheque status etc.
Mobile Banking is an application that lives on a mobile phone, which lets one
access their bank accounts with just a few presses away. This application lets the banking
institutions provide value added services to their customers. Mobile Banking is the most
promising way to reach more number of customers who cannot frequently visit banks or
ATMs to get the information about their account. And due to its ability to provide
services anywhere anytime the customers of Mobile Banking rapidly increases.
Mobile Banking is being used to attract low-income populations in rural locations.

INTRODUCTION
1.1 Scope
Here we are first assuming a login process, a very usual process of getting
username and passwords for users. We are also considering that they have the bank
accounts that means they are having manual transactions with the particular bank, so a
good customer of this bank whom we will not want to lose for the reason of security
breach in.
1.2 PROJECT DESCRIPTION
This project acts as an interface between the Customer and Bank.

Customer has to request for new password when he or she wants to login.

Customer can login with his new password.

He or she can view his balance

Can view mini statement

Can logged out

If any of the above-specified functions fail the corresponding error message will be
displayed which makes the project friendlier to the user. The application software is
developed with MySql database and GUI based front- end tool J2EE. The information
about the users is stored in the database in the related tables. All designing of pages are
done with LCDUI using mobile wireless tool kit and Java. Using Java Technologies
makes our project more robust and importantly portability over different systems.

Chapter -2

System Analysis
PROBLEM DEFINITION

2.1 Existing System


The first step of preliminary study in the system analysis process involves the
identification of needs for computerization. The motivation behind this project is to
overcome all the defects in the existing system.
Some defects in existing system are:
Every time Customer has to visit the bank whenever he want to perform any
transactions.
2.2 Proposed System
Features of proposed system:

No need of visiting bank every time

All banking services like checking balance, mini-statement, applying for


cheques are provided in mobile.

2.3 User Classes and Characteristics


The Customer has to be very familiar with accessing the Internet and how to use
the basic controls displayed in the mobile. The Customer can request for new
password, interacting with mobile application.
2.4 Operating Environment:
Software Requirements are Windows as Operating System. J2ME Tool Kit as
Front-End designing tools. MySql is used as Database Server. Tomcat server is the Web
server. Servlets are used as server side languages, J2ME tool kit for Mobile service.
2.5 Design and Implementation Constraints
This project will be developed using the technologies like Java, J2ME,Java Servlets,
MySQL and Web for all which I need to fetch knowledge on all of them in order to code
for the project. Also Ill be learning clearly about Software Development Life Cycle.

2.6 User Documentation


This document also includes a user manual which assists the new user to go
about the project, he can even get the online help which caters the needs of a new user
and makes this project more user friendly, a step by step approach online makes it easy to
use software for a nave user.
2.7 Module Description
In this we have five modules
Balance Enquiry
Mini Statement

Cheque Status Enquiry

Request for New Cheque book


Change Password
View Bills
Balance Enquiry
This module provides facility to know the balance of the customer
Mini Statement
This module gives the whole transaction details such as deposit, withdrawal and
balance.
Cheque Status Enquiry
This module gives the withdrawal information if withdrawal mode is Cheque
Request for New Cheque
This module provides facility to request a new cheque book by the customer.
Change Password
This module allows customer to change his current password to new password

2.8 HARDWARE AND SOFTWARE REQUIREMENTS


Hard Ware Requirements

Processor:: Pentium-III (or) Higher

Ram:: 254MB (or) Higher

Cache:: 512MB

Hard disk:: 40GB

Soft Ware Requirements

Technology: Java 2 Standard Edition, JDBC, and J2ME Tool Kit

Server Side Technologies: Servlets, Tomcat 5.5

Operating System: Microsoft Windows, Linux or Mac any version

Chapter 3

FEASIBILITY STUDY

3. FEASIBILITY STUDY:
The next step in analysis is to verify the feasibility of the proposed system. All
projects are feasible given unlimited resources and infinite time. But in reality both
resources and time are scarce. Project should confirm to time bounce and should be
optimal in there consumption of resources. This place a constant is approval of any
project.
Feasibility has applied to Mobile Banking pertains to the following areas:

Technical feasibility

Operational feasibility

Economical feasibility

3.1 TECHNICAL FEASIBILITY:


To determine whether the proposed system is technically feasible, we should take into
consideration the technical issues involved behind the system.
Mobile Banking uses the web technologies, which is rampantly employed these
days worldwide. The world without the web is incomprehensible today. That goes to
proposed system is technically feasible.
3.2 OPERATIONAL FEASIBILITY:
To determine the operational feasibility of the system we should take into
consideration the awareness level of the users. This system is operational feasible since
the users are familiar with the technologies and hence there is no need to gear up the
personnel to use system. Also the system is very friendly and to use.
3.3. ECONOMIC FEASIBILITY
To decide whether a project is economically feasible, we have to consider various factors
as:

Cost benefit analysis

Long-term returns

Maintenance costs
6

The proposed Mobile Banking is computer based. It requires average


computing capabilities and access to internet, which are very basic requirements hence it
doesnt incur additional economic overheads, which renders the system economically
feasible.

Chapter 4

SYSTEM DESIGN

SYSTEM DESIGN
System design is transition from a user oriented document to programmers or data
base personnel. The design is a solution, how to approach to the creation of a new system.
This is composed of several steps. It provides the understanding and procedural details
necessary for implementing the system recommended in the feasibility study. Designing
goes through logical and physical stages of development, logical design reviews the
present physical system, prepare input and output specification, details of implementation
plan and prepare a logical design walkthrough.
The database tables are designed by analyzing functions involved in the
system and format of the fields is also designed. The fields in the database tables should
define their role in the system. The unnecessary fields should be avoided because it
affects the storage areas of the system. Then in the input and output screen design, the
design should be made user friendly. The menu should be precise and compact.
SOFTWARE DESIGN
In designing the software following principles are followed:
1. Modularity and partitioning: software is designed such that, each system should
consists of hierarchy of modules and serve to partition into separate function.
2. Coupling: modules should have little dependence on other modules of a system.
3. Cohesion: modules should carry out in a single processing function.
4. Shared use: avoid duplication by allowing a single module is called by other that need
the function it provides

4.1 DATA FLOW DIAGRAMS


Level 0 DFD for Customer:
Customer

Secure Communication

Bank Application

Level-1 Subsystem Level:


A level 1 DFD describes the next level of details within the system, detailing the data
flows between subsystems, which makeup the whole

4.2 UML Diagrams


Usecase Diagram

Request to Cheque Book

customer
ViewMiniStatements

Cheque Status

Change Password

View Bills

LogOut

10

Sequence Diagram for Login Process

user request

mobile
simulator

web server

database

enter userid and password


userid,password is sent for process

process the values and check from the database

value return from the database


if valid login in to the form

if invalid same window displayed

11

Request for Change password:

Request for
password

mobile
simulator

webserver

Database

Request for password


process the request

Retype and confirm


process the user values
check from the database

forward result

return to mobile browser

12

Collabration diagram for login process:


2: userid,password is sent for process
mobile
simulator

web
server
5: if valid login in to the form
6: if invalid same window displayed
process
thefrom
values
check from the database
4:3: value
return
theand
database

1: enter userid and password

databas
e

user
request

Collabration for Change password:

2: process the request

1: Request for password


3: Retype and confirm
mobile
simulator

Request for
password

7: return to mobile browser


4: process the user values

5: check from the database


webserv
er

Databas
e
6: forward result

13

4.3 DATABASE DESIGN:


TABLE: balance
Field Name
balid

Data type
int

Constraints
Primary key

amount

Varchar(40)

prestime

timestamp

transcid

int

accnumber

Varchar(6)

TABLE: check_request
Field Name

Data type

Constraints

reqid

Int

Not Null

Cheque_number

int

Not Null

accnumber

varchar

Not Null

TABLE: deposit
Field Name

Data type

Constraints

Depid

Int

Not Null

Amount

Varchar

Not Null

dptime

Timestamp

Not Null

Transcid

Int

Not Null

accnumber

varchar

Not Null

TABLE: login
Field Name
Loginid

Data type
Varchar

Constraints
Not Null

14

Password

Varchar

Not Null

accnumber

int

Not Null

TABLE: transaction
Field Name

Data type

Constraints

Transacid

Int

Not Null

Transcname

Varchar

Not Null

transctime

Timestamp

Not Null

accnumber

varchar

Not Null

TABLE: withdraw
Field Name

Data type

Constraints

Wid

Int

Not Null

Amount

Varchar

Not Null

Mode

Timestamp

Not Null

W_d_time

varchar

Not Null

5 INPUT/OUTPUT DESIGN
5.1 Input design:
considering the requirements, procedures to collect the necessary input data
in most efficiently designed. The input design has been done keeping in view that, the
interaction of the user with the system being the most effective and simplified way.
Also the measures are taken for the following

15

Controlling the amount of input

Avoid unauthorized access to the certificate authenticator

Eliminating extra steps

Keeping the process simple

At this stage the input forms and screens are designe

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

16

Chapter -6

IMPLEMENTATION

OVERVIEW OF SOFTWARE DEVELOPMENT TOOLS AND TECHNOLOGIES


6.1 MySQL
The database has become an integral part of almost every human's life. Without it, many
things we do would become very tedious, perhaps impossible tasks. Banks, universities,
and libraries are three examples of organizations that depend heavily on some sort of
database system. On the Internet, search engines, online shopping , and even the website
naming convention (http://www...) would be impossible without the use of a database. A
database that is implemented and interfaced on a computer is often termed a database
server.
One of the fastest SQL (Structured Query Language) database servers currently on
the market is the MySQL server.MySQL, available for download, offers the database
programmer with an array of options and capabilities rarely seen in other database
servers. What's more, MySQL is free of charge for those wishing to use it for private and
commercial use. Those wishing to develop applications specifically using MySQL should
consult MySQL's licensing section, as there is a charge for licensing the product.
These capabilities range across a number of topics, including the following:

Ability to handle an unlimited number of simultaneous users.

Capacity to handle 50,000,000+ records.

Very fast command execution, perhaps the fastest to be found on the market.

Easy and efficient user privilege system.

A database is really nothing more than a hierarchy of increasingly complex data


structures. In MySQL, the acknowledged structure for holding blocks (or records) of
information is called the table.

17

These records, in turn, are made up of the smallest object that can be manipulated by
the user, known as the data type. Together, one or more of these data types form a
record. A table holds the collection of records that make up part of the database. We can
consider the hierarchy of a database to be that of the following:
Database < Table < Record < Datatype
Datatypes come in several forms and sizes, allowing the programmer to create
tables suited for the scope of the project. The decisions made in choosing proper
datatypes greatly influence the performance of a database, so it is wise to have a detailed
understanding of these concepts.
MySQL Datatypes
MySQL is capable of many of the datatypes that even the novice programmer has
probably already been exposed to. Some of the more commonly used include:
CHAR (M)
CHAR's are used to represent fixed length strings. A CHAR string can range from 1-255
characters. In later table creation, an example CHAR datatype would be declared as
follows:
ex.
car_model CHAR(10);
VARCHAR(M)
VARCHAR is a more flexible form of the CHAR data type. It also represents data of type
String, yet stores this data in variable length format. Again, VARCHAR can hold 1-255
characters. VARCHAR is usually a wiser choice than CHAR, due to it's variable length
format characteristic. Although, keep in mind that CHAR is much faster than
VARCHAR,

sometimes

up

to

50%.

(A CHAR stores the whole length of the declared variable, regardless of the size of the

18

data contained within, whereas a VARCHAR only stores the length of the data, thus
reducing size of the database file.)
ex.
car_model VARCHAR(10);
INT (M) [Unsigned]
The INT datatype stores integers ranging from -2147483648 to 2147483647. An optional
"unsigned" can be denoted with the declaration, modifying the range to be 0 to
4294967295
ex.
light_years INT;
Valid integer: '-24567'.

Invalid integer: '3000000000'.

ex.
light_years INT unsigned;
Valid integer: '3000000000'.

Invalid integer: '-24567'.

FLOAT [(M,D)]
A FLOAT represents small decimal numbers, used when a somewhat more precise
representation of a number is required.
ex.
rainfall FLOAT (4,2);
This could be used to represent rainfall average in centimeters per year, which could be a
decimal value. More specifically, FLOAT (4,2) states the fact that rainfall can hold up to
four characters and two decimal places. Thus,
42.35 is valid, accurately represented.
324.45 is invalid, rounded to 324.5.
2.2 is valid, accurately represented.
34.542 is invalid, rounded to 34.54.

19

Note: Due to the fact that FLOAT is rounded, those wishing to represent money values
would find it wise to use DECIMAL, a datatype found within MySQL that does not
round values. Consult the documentation for a complete explanation.
DATE
Stores date related information. The default format is 'YYYY-MM-DD', and ranges from
'0000-00-00' to '9999-12-31'. MySQL provides a powerful set of date formatting and
manipulation commands, too numerous to be covered within this article. However, one
can find these functions covered in detail within the MySQL documentation.
the_date DATE;
TEXT / BLOB
The text and blob datatypes are used when a string of 255 - 65535 characters is required
to be stored. This is useful when one would need to store an article such as the one you
are reading. However, there is no end space truncation as with VARCHAR AND CHAR.
The only difference between BLOB and TEXT is that TEXT is compared case
insensitively, while BLOB is compared case sensitively.
Records
Together, a group of declared datatypes form what is known as a record. A record can be
as small as one data variable, or as many as deemed needed. One or more records form
the structure of a table.
The Bigger Picture: Tables
Before we can execute commands on the database, we must first create a table in which
data can be stored. This is accomplished in the following manner:
mysql> CREATE TABLE test (
> name VARCHAR (15),
> email VARCHAR (25),
> phone_number INT,

20

> ID INT NOT NULL AUTO_INCREMENT,


> PRIMARY KEY (ID));
Ensuing output:
Query OK, 0 rows affected (0.10 sec)
mysql>
The first table in your database has now been created. Note: no two tables can have the
same name.
Note(2): Each dataspace is more often referred to as a column.
Column Characteristics:

A name may not be made up of strictly numbers.

A name may start with a number.

A name may be up to 64 characters.

Other table options:


The following options can be placed after any datatype, adding other characteristics and
capabilities to them.

Primary Key. Used to differentiate one record from another. No two records can
have the same primary key. This is obviously useful when it is imperative that no
two records are mistaken to be the other.

Auto_Increment. A column with this function is automatically incremented one


value (previous + 1) when an insertion is made into the record. The datatype is
automatically incremented when 'NULL' is inserted into the column.

NOT NULL. Signifies that the column can never be assigned a NULL value.

ex.
soc_sec_number INT PRIMARY KEY;
No two soc_sec_number records can hold the same value.

21

ID_NUMBER INT AUTO_INCREMENT;


Insertion of records
Note: The originally created table, test, created in the last section will be used to illustrate
the examples in this section. Here it is again, for quick reference:
mysql> CREATE TABLE test (
> name VARCHAR (15),
> email VARCHAR (25),
> phone_number INT,
> ID INT NOT NULL AUTO_INCREMENT,
> PRIMARY KEY (ID));
Insertion of data into the table is accomplished, logically enough, using the INSERT
command.
mysql> INSERT INTO test VALUES
mysql> ('Bugs Bunny', 'carrots@devshed.com',
mysql> 5554321, NULL);
Result, assuming the command was correctly entered:
Query OK, 1 row affected (0.02 sec)
mysql>
Selection
A database would not be much use if one was not able to search and extract data from it.
In MySql terms, this is accomplished through the SELECT statement.
mysql> SELECT * FROM test
mysql> WHERE (name = "Bugs Bunny");

22

Result:
name

email

phone ID

Bugs Bunny carrots@devshed.com 5554321 1


Let's assume we have inserted four differing records, all bearing the same name of "Bugs
Bunny", yet having different email addresses and phone numbers. The table test, would
look somewhat like the following:
name

email

Bugs Bunny carrots@devshed.com

phone

ID

5554321 1

Bugs Bunny peppers@devshed.com 5554331 2


Bugs Bunny lettuce@devshed.com

5554341 3

Bugs Bunny celery@devshed.com

5554351 4

Deletion
One can also delete records inserted into the table. This is accomplished through the
DELETE command.
mysql> DELETE FROM test
mysql> WHERE (name = "Bugs Bunny");
Result:
This would result in the deletion of all records within the table test containing name
"Bugs Bunny".

Another example:

23

mysql> DELETE FROM test


mysql> WHERE (phone_number = 5554321);
Result: (Using the previously illustrated example)
name

Email

phone

ID

Bugs Bunny peppers@devshed.com 5554331 2


Bugs Bunny lettuce@devshed.com

5554341 3

Bugs Bunny celery@devshed.com

5554351 4

Modification
MySQL also has the capability of modifying data already entered into the table. This is
accomplished through the UPDATE command.
mysql> UPDATE test SET name = 'Daffy Duck'
mysql> WHERE name = "Bugs Bunny";

name

Email

phone

ID

Daffy Duck peppers@devshed.com 5554331 2


Daffy Duck lettuce@devshed.com

5554341 3

Daffy Duck celery@devshed.com

5554351 4

This section, we covered the core MySQL database manipulation functions, basic
insertion, deletion, modification, and search. The next section will elaborate on these
capabilities, providing extended functioning and flexibility when manipulating the
database.

24

What we have covered so far is but a small part of what MySQL is capable of. Let's delve
a little deeper into the language, exploring some of the more advanced commands of the
language.
Logical Operations
MySQL includes full support of all basic logical operations.
AND (&&)
mysql> SELECT * FROM test WHERE
mysql> (name = "Bugs Bunny") AND
mysql> (phone_number = 5554321);
Result:
All records containing the name "Bugs Bunny" AND the phone number '5554321' will be
displayed to the screen.
OR ( || )
mysql> SELECT * FROM test WHERE
mysql> (name = "Bugs Bunny") OR
mysql> (phone_number = 5554321);
Result:
All records containing the name "Bugs Bunny" OR the phone number '5554321' will be
displayed to the screen.

NOT ( ! )
mysql> SELECT * FROM test WHERE
mysql> (name != "Bugs Bunny");

25

Result:
All records NOT containing the name "Bugs Bunny" will be displayed to the screen.
Order By
mysql> SELECT * FROM test WHERE
mysql> (name = "Bugs Bunny") ORDER BY
mysql> phone_number;
Result:
All records containing the name "Bugs Bunny" will be displayed to the screen, ordered in
respect to the phone_number.
Search functions
MySQL offers the user the ability to perform both general and specific searches on data.
mysql> SELECT * FROM test WHERE
mysql> (name LIKE "%gs Bunny");
Result:
All records containing the partial string "gs Bunny" will be displayed to the screen. This
would include such names as: "Bugs Bunny", "ags Bunny", "gs Bunny", and "234rtgs
Bunny".
Notice that "LIKE" has been used instead of the equals sign (=). "LIKE" signifies that
one is searching for an estimate of the data requested, and not necessarily an exact copy.

The '%' sign could be placed anywhere within the string. The method in which the server
searches for a string is dependent upon where one places the '%' sign.

26

mysql> SELECT * FROM test WHERE


mysql> (name LIKE "Bugs Bunny%");
Result:
All records containing the partial string "Bugs Bunny" will be displayed to the screen.
This would include such names as: "Bugs Bunnys", "Bugs Bunnyyyy453", "Bugs
Bunnytrtrtrtrtr", but not "gs Bunny".
Focused Search Results
One can also perform searches and display only certain columns.
mysql> SELECT name FROM test WHERE
mysql> (name = "Bugs Bunny");
Result:
name
Bugs Bunny
Alter table
Another very important function of MySQL is the ability to modify previously created
tables. This is accomplished via the ALTER statement. This function allows one to add,
modify, and delete columns, as well as rename the table, among other functions.
Example: Rename the table
mysql> ALTER table test RENAME mytest;

Example: Add a column


mysql> ALTER table mytest ADD birthday DATE;

27

Example: Modify a column


mysql> ALTER table mytest CHANGE
mysql> name newname VARCHAR (25);
Example: Delete a column
mysql> ALTER table mytest DROP newname;
Executing the above four functions would modify test, creating the following table:
mysql> TABLE mytest (
> email VARCHAR (25),
> phone_number INT,
> ID INT AUTO_INCREMENT,
> birthday DATE );
HTML
HTML, an initialism of Hypertext Markup Language, is the predominant markup
language for web pages. It provides a means to describe the structure of text-based
information in a document by denoting certain text as headings, paragraphs, lists, and
so on and to supplement that text with interactive forms, embedded images, and other
objects. HTML is written in the form of labels (known as tags), surrounded by angle
brackets. HTML can also describe, to some degree, the appearance and semantics of a
document, and can include embedded scripting language code which can affect the
behavior of web browsers and other HTML processors.
HTML is also often used to refer to content of the MIME type text/html or even more
broadly as a generic term for HTML whether in its XML-descended form (such as
XHTML 1.0 and later) or its form descended directly from SGML
Hyper Text Markup Language
Hypertext Markup Language (HTML), the languages of the World Wide Web (WWW),
allows users to produces Web pages that include text, graphics and pointer to other Web
pages (Hyperlinks).
28

HTML is not a programming language but it is an application of ISO Standard 8879,


SGML (Standard Generalized Markup Language), but specialized to hypertext and
adapted to the Web. The idea behind Hypertext is that instead of reading text in rigid
linear structure, we can easily jump from one point to another point. We can navigate
through the information based on our interest and preference. A markup language is
simply a series of elements, each delimited with special characters that define how text or
other items enclosed within the elements should be displayed. Hyperlinks are underlined
or emphasized works that load to other documents or some portions of the same
document.
HTML can be used to display any type of document on the host computer, which can be
geographically at a different location. It is a versatile language and can be used on any
platform or desktop.
HTML provides tags (special codes) to make the document look attractive. HTML tags
are not case-sensitive. Using graphics, fonts, different sizes, color, etc., can enhance the
presentation of the document. Anything that is not a tag is part of the document itself.
Basic HTML Tags:
<! --

-->

Specifies comments

<A>.</A>

Creates hypertext links

<B>.</B>

Formats text as bold

<BIG>.</BIG>

Formats text in large font.

<BODY></BODY>

Contains all tags and text in the HTML document

<CENTER>...</CENTER>

Creates text

<DD></DD>

Definition of a term

<DL>...</DL>

Creates definition list

<FONT></FONT>

Formats text with a particular font

<FORM>...</FORM>

Encloses a fill-out form

<FRAME>...</FRAME>

Defines a particular frame in a set of frames

<H#></H#>

Creates headings of different levels( 1 6 )

<HEAD>...</HEAD>

Contains tags that specify information about a


document

<HR>...</HR>

Creates a horizontal rule

29

<HTML></HTML>

Contains all other HTML tags

<META>...</META>

Provides meta-information about a document

<SCRIPT></SCRIPT>

Contains client-side or server-side script

<TABLE></TABLE>

Creates a table

<TD></TD>

Indicates table data in a table

<TR></TR>

Designates a table row

<TH></TH>

Creates a heading in a table

Attributes
The attributes of an element are name-value pairs, separated by "=", and written within
the start label of an element, after the element's name. The value should be enclosed in
single or double quotes, although values consisting of certain characters can be left
unquoted in HTML (but not XHTML).Leaving attribute values unquoted is considered
unsafe.
Most elements take any of several common attributes: id, class, style and title. Most also
take language-related attributes: lang and dir.
The id attribute provides a document-wide unique identifier for an element. This can be
used by stylesheets to provide presentational properties, by browsers to focus attention on
the specific element or by scripts to alter the contents or presentation of an element. The
class attribute provides a way of classifying similar elements for presentation purposes.
For example, an HTML document (or a set of documents) may use the designation
class="notation" to indicate that all elements with this class value are all subordinate to
the main text of the document (or documents). Such notation classes of elements might
be gathered together and presented as footnotes on a page, rather than appearing in the
place where they appear in the source HTML.
An author may use the style non-attributal codes presentational properties to a particular
element. It is considered better practice to use an elements son- id page and select the
element with a stylesheet, though sometimes this can be too cumbersome for a simple ad
hoc application of styled properties. The title is used to attach subtextual explanation to
an element. In most browsers this title attribute is displayed as what is often referred to as

30

a tooltip. The generic inline span element can be used to demonstrate these various nonattributes.
The preceding displays as HTML (pointing the cursor at the abbreviation should display
the title text in most browsers).
Advantages

A HTML document is small and hence easy to send over the net. It is
small because it does not include formatted information.

HTML is platform independent.

HTML tags are not case-sensitive.

JavaScript
JavaScript is a script-based programming language that was developed by Netscape
Communication Corporation. JavaScript was originally called Live Script and renamed as
JavaScript to indicate its relationship with Java. JavaScript supports the development of
both client and server components of Web-based applications. On the client side, it can be
used to write programs that are executed by a Web browser within the context of a Web
page. On the server side, it can be used to write Web server programs that can process
information submitted by a Web browser and then update the browsers display
accordingly
Even though JavaScript supports both client and server Web programming, we prefer
JavaScript at Client side programming since most of the browsers supports it. JavaScript
is almost as easy to learn as HTML, and JavaScript statements can be included in HTML
documents by enclosing the statements between a pair of scripting tags
<SCRIPTS>.. </SCRIPT>.
<SCRIPT LANGUAGE = JavaScript>
JavaScript statements
</SCRIPT>
Here are a few things we can do with JavaScript:

31

Validate the contents of a form and make calculations.

Add scrolling or changing messages to the Browsers status line.

Animate images or rotate images that change when we move the mouse
over them.

Detect the browser in use and display different content for different
browsers.

Detect installed plug-ins and notify the user if a plug-in is required.

We can do much more with JavaScript, including creating entire application.


JavaScript Vs Java
JavaScript and Java are entirely different languages. A few of the most glaring differences
are:

Java applets are generally displayed in a box within the web document; JavaScript
can affect any part of the Web document itself.

While JavaScript is best suited to simple applications and adding interactive


features to Web pages; Java can be used for incredibly complex applications.

There are many other differences but the important thing to remember is that JavaScript
and Java are separate languages. They are both useful for different things; in fact they can
be used together to combine their advantages.
Advantages

JavaScript can be used for Sever-side and Client-side scripting.

It is more flexible than VBScript.

JavaScript is the default scripting languages at Client-side since all the


browsers supports it.

XML Extensible Markup Language


XML is a markup language for documents containing structured information.

32

Structured information contains both content (words, pictures, etc.) and some indication
of what role that content plays (for example, content in a section heading has a different
meaning from content in a footnote, which means something different than content in a
figure caption or content in a database table, etc.). Almost all documents have some
structure.
A markup language is a mechanism to identify structures in a document. The XML
specification defines a standard way to add markup to documents.
The Extensible Markup Language (XML) is a general-purpose markup language.It is
classified as an extensible language because it allows its users to define their own tags. Its
primary purpose is to facilitate the sharing of structured data across different information
systems, particularly via the Internet.It is used both to encode documents and serialize
data. In the latter context, it is comparable with other text-based serialization languages
such as JSON and YAML.
It started as a simplified subset of the Standard Generalized Markup Language (SGML),
and is designed to be relatively human-legible. By adding semantic constraints,
application languages can be implemented in XML. These include XHTML, RSS,
MathML, GraphML, Scalable Vector Graphics, MusicXML, and thousands of others.
Moreover, XML is sometimes used as the specification language for such application
languages.
Why XML?
In order to appreciate XML, it is important to understand why it was created. XML was
created so that richly structured documents could be used over the web. The only viable
alternatives, HTML and SGML, are not practical for this purpose.
HTML, comes bound with a set of semantics and does not provide arbitrary structure.
SGML provides arbitrary structure, but is too difficult to implement just for a web
browser. Full SGML systems solve large, complex problems that justify their expense.
Viewing structured documents sent over the web rarely carries such justification.

33

XML shall support a wide variety of applications. XML should be beneficial to a wide
variety of diverse applications: authoring, browsing, content analysis, etc. Although the
initial focus is on serving structured documents over the web, it is not meant to narrowly
define XML.
XML shall be compatible with SGML. Most of the people involved in the XML effort
come from organizations that have a large, in some cases staggering, amount of material
in SGML. XML was designed pragmatically, to be compatible with existing standards
while solving the relatively new problem of sending richly structured documents over the
web.
It shall be easy to write programs that process XML documents. The colloquial way of
expressing this goal while the spec was being developed was that it ought to take about
two weeks for a competent computer science graduate student to build a program that can
process XML documents.
XML syntax
As long as only well-formedness is required, XML is a generic framework for storing any
amount of text or any data whose structure can be represented as a tree. The only
indispensable syntactical requirement is that the document has exactly one root element
(alternatively called the document element). This means that the text must be enclosed
between a root opening tag and a corresponding closing tag. The following is a wellformed XML document:
<book>This is a book.... </book>
The root element can be preceded by an optional XML declaration. This element states
what version of XML is in use (normally 1.0); it may also contain information about
character encoding and external dependencies.
<?xml version="1.0" encoding="UTF-8"?>
The specification requires that processors of XML support the pan-Unicode character
encodings UTF-8 and UTF-16 (UTF-32 is not mandatory). The use of more limited
encodings, such as those based on ISO/IEC 8859, is acknowledged and is widely used
and supported.

34

Comments can be placed anywhere in the tree, including in the text if the content of the
element is text or #PCDATA.
XML comments start with <!-- and end with -->. Two dashes (--) may not appear
anywhere in the text of the comment.
<!-- This is a comment. -->
In any meaningful application, additional markup is used to structure the contents of the
XML document. The text enclosed by the root tags may contain an arbitrary number of
XML elements. The basic syntax for one element is:
<name attribute="value">content</name>
Here, content is some text which may again contain XML elements. So, a generic
XML document contains a tree-based data structure. In this respect, it is similar to the
LISP programming language's S-expressions, which describe tree structures wherein each
node may have its own property list.
Attribute values must always be quoted, using single or double quotes, and each attribute
name should appear only once in any element. XML requires that elements be properly
nested elements may never overlap. For example, the code below is not well-formed
XML, because the em and strong elements overlap:
<!-- WRONG! NOT WELL-FORMED XML! -->
<p>Normal <em>emphasized <strong>strong emphasized</em> strong</strong></p>
XML provides special syntax for representing an element with empty content. Instead of
writing a start tag followed immediately by an end tag, a document may contain an
empty-element tag. An empty-element tag resembles a start tag but contains a slash just
before the closing angle bracket.
Processing XML files
Three traditional techniques for processing XML files are:
Using a programming language and the SAX API.
Using a programming language and the DOM API.
More recent and emerging techniques for processing XML files are:
Push Parsing
Data binding

35

Non-extractive XML Processing API such as VTD-XML


Simple API for XML (SAX)
SAX is a lexical, event-driven interface in which a document is read serially and its
contents are reported as "callbacks" to various methods on a handler object of the user's
design. SAX is fast and efficient to implement, but difficult to use for extracting
information at random from the XML, since it tends to burden the application author with
keeping track of what part of the document is being processed. It is better suited to
situations in which certain types of information are always handled the same way, no
matter where they occur in the document.
DOM
DOM is an interface-oriented Application Programming Interface that allows for
navigation of the entire document as if it were a tree of "Node" objects representing the
document's contents. A DOM document can be created by a parser, or can be generated
manually by users (with limitations). Data types in DOM Nodes are abstract;
implementations provide their own programming language-specific bindings. DOM
implementations tend to be memory intensive, as they generally require the entire
document to be loaded into memory and constructed as a tree of objects before access is
allowed.

36

Java Technology
Java technology is both a programming language and a platform.
The Java Programming Language
The Java programming language is a high-level language that can be
characterized by all of the following buzzwords:

Simple

Architecture neutral

Object oriented

Portable

Distributed

High performance

Interpreted

Multithreaded

Robust

Dynamic

Secure

With most programming languages, you either compile or interpret a program so that you
can run it on your computer. The Java programming language is unusual in that a
program is both compiled and interpreted. With the compiler, first you translate a
program into an intermediate language called Java byte codes the platformindependent codes interpreted by the interpreter on the Java platform. The interpreter
parses and runs each Java byte code instruction on the computer. Compilation happens
just once; interpretation occurs each time the program is executed. The following figure
illustrates how this works.

37

FIGURE 2- WORKING OF JAVA


You can think of Java bytecodes as the machine code instructions for the Java
Virtual Machine (Java VM). Every Java interpreter, whether its a development tool or a
Web browser that can run applets, is an implementation of the Java VM. Java bytecodes
help make write once, run anywhere possible. You can compile your program into
bytecodes on any platform that has a Java compiler. The bytecodes can then be run on
any implementation of the Java VM. That means that as long as a computer has a Java
VM, the same program written in the Java programming language can run on Windows
2000, a Solaris workstation, or on an iMac.
The Java Platform
A platform is the hardware or software environment in which a program runs.
Weve already mentioned some of the most popular platforms like Windows 2000, Linux,
Solaris, and MacOS. Most platforms can be described as a combination of the operating
system and hardware. The Java platform differs from most other platforms in that its a
software-only platform that runs on top of other hardware-based platforms.
The Java platform has two components:

The Java Virtual Machine (Java VM)

The Java Application Programming Interface (Java API)


Youve already been introduced to the Java VM. Its the base for the Java

platform and is ported onto various hardware-based platforms.


The Java API is a large collection of ready-made software components that provide many
useful capabilities, such as graphical user interface (GUI) widgets. The Java API is
grouped into libraries of related classes and interfaces; these libraries are known as

38

packages. The next section, What Can Java Technology Do?, highlights what
functionality some of the packages in the Java API provide.
The following figure depicts a program thats running on the Java platform. As the
figure shows, the Java API and the virtual machine insulate the program from the
hardware.

FIGURE 3- THE JAVA PLATFORM


Native code is code that after you compile it, the compiled code runs on a specific
hardware platform. As a platform-independent environment, the Java platform can be a
bit slower than native code. However, smart compilers, well-tuned interpreters, and justin-time bytecode compilers can bring performance close to that of native code without
threatening portability.
What Can Java Technology Do?
The most common types of programs written in the Java programming language
are applets and applications. If youve surfed the Web, youre probably already familiar
with applets. An applet is a program that adheres to certain conventions that allow it to
run within a Java-enabled browser.
However, the Java programming language is not just for writing cute, entertaining
applets for the Web. The general-purpose, high-level Java programming language is also
a powerful software platform. Using the generous API, you can write many types of
programs.
An application is a standalone program that runs directly on the Java platform. A
special kind of application known as a server serves and supports clients on a network.
Examples of servers are Web servers, proxy servers, mail servers, and print servers.
Another specialized program is a servlet. A servlet can almost be thought of as an applet
that runs on the server side. Java Servlets are a popular choice for building interactive

39

web applications, replacing the use of CGI scripts. Servlets are similar to applets in that
they are runtime extensions of applications. Instead of working in browsers, though,
servlets run within Java Web servers, configuring or tailoring the server.
How does the API support all these kinds of programs? It does so with packages
of software components that provide a wide range of functionality. Every full
implementation of the Java platform gives you the following features:

The essentials: Objects, strings, threads, numbers, input and output, data

structures, system properties, date and time, and so on.

Applets: The set of conventions used by applets.

Networking: URLs, TCP (Transmission Control Protocol), UDP (User Data gram

Protocol) sockets, and IP (Internet Protocol) addresses.

Internationalization: Help for writing programs that can be localized for users

worldwide. Programs can automatically adapt to specific locales and be displayed in the
appropriate language.

Security: Both low level and high level, including electronic signatures, public

and private key management, access control, and certificates.

Software components: Known as JavaBeansTM, can plug into existing component

architectures.

Object serialization: Allows lightweight persistence and communication via

Remote Method Invocation (RMI).

Java Database Connectivity (JDBCTM): Provides uniform access to a wide

range of relational databases.


The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,
collaboration, telephony, speech, animation, and more. The following figure depicts what
is included in the Java 2 SDK.

40

FIGURE 4 JAVA 2 SDK


ODBC
Microsoft Open Database Connectivity (ODBC) is a standard programming
interface for application developers and database systems providers. Before ODBC
became a de facto standard for Windows programs to interface with database systems,
programmers had to use proprietary languages for each database they wanted to connect
to. Now, ODBC has made the choice of the database system almost irrelevant from a
coding perspective, which is as it should be. Application developers have much more
important things to worry about than the syntax that is needed to port their program from
one database to another when business needs suddenly change.
Through the ODBC Administrator in Control Panel, you can specify the particular
database that is associated with a data source that an ODBC application program is
written to use. Think of an ODBC data source as a door with a name on it. Each door will
lead you to a particular database. For example, the data source named Sales Figures
might be a SQL Server database, whereas the Accounts Payable data source could refer to
an Access database. The physical database referred to by a data source can reside
anywhere on the LAN.
The ODBC system files are not installed on your system by Windows 95. Rather,
they are installed when you setup a separate database application, such as SQL Server
Client or Visual Basic 4.0. When the ODBC icon is installed in Control Panel, it uses a
file called ODBCINST.DLL. It is also possible to administer your ODBC data sources
through a stand-alone program called ODBCADM.EXE. There is a 16-bit and a 32-bit
41

version of this program, and each maintains a separate list of ODBC data sources.
From a programming perspective, the beauty of ODBC is that the application can be
written to use the same set of function calls to interface with any data source, regardless
of the database vendor. The source code of the application doesnt change whether it talks
to Oracle or SQL Server. We only mention these two as an example. There are ODBC
drivers available for several dozen popular database systems. Even Excel spreadsheets
and plain text files can be turned into data sources. The operating system uses the
Registry information written by ODBC Administrator to determine which low-level
ODBC drivers are needed to talk to the data source (such as the interface to Oracle or
SQL Server). The loading of the ODBC drivers is transparent to the ODBC application
program. In a client/server environment, the ODBC API even handles many of the
network issues for the application programmer.
The advantages of this scheme are so numerous that you are probably thinking
there must be some catch. The only disadvantage of ODBC is that it isnt as efficient as
talking directly to the native database interface. ODBC has had many detractors make the
charge that it is too slow. Microsoft has always claimed that the critical factor in
performance is the quality of the driver software that is used. In our humble opinion, this
is true. The availability of good ODBC drivers has improved a great deal recently. And
anyway, the criticism about performance is somewhat analogous to those who said that
compilers would never match the speed of pure assembly language. Maybe not, but the
compiler (or ODBC) gives you the opportunity to write cleaner programs, which means
you finish sooner. Meanwhile, computers get faster every year.

JDBC
In an effort to set an independent database standard API for Java, Sun
Microsystems developed Java Database Connectivity, or JDBC. JDBC offers a generic
SQL database access mechanism that provides a consistent interface to a variety of
RDBMSs. This consistent interface is achieved through the use of plug-in database
connectivity modules, or drivers. If a database vendor wishes to have JDBC support, he
or she must provide the driver for each platform that the database and Java run on.
42

To gain a wider acceptance of JDBC, Sun based JDBCs framework on ODBC.


As you discovered earlier in this chapter, ODBC has widespread support on a variety of
platforms. Basing JDBC on ODBC will allow vendors to bring JDBC drivers to market
much faster than developing a completely new connectivity solution.
JDBC was announced in March of 1996. It was released for a 90 day public review that
ended June 8, 1996. Because of user input, the final JDBC v1.0 specification was
released soon after.
The remainder of this section will cover enough information about JDBC for you
to know what it is about and how to use it effectively. This is by no means a complete
overview of JDBC. That would fill an entire book.
DRIVER MANAGER AND DRIVER:
The java.sql package defines an interface called
Java.sql.Driver that makes to be implemented by all the JDBC drivers and a class called
java.sql.DriverManager that acts as the interface to the database clients for performing
tasks like connecting to external resource managers, and setting log streams. When a
JDBC client requests the DriverManager to make a connection to an external resource
manager, it delegates the task to an approate driver class implemented by the JDBC
driver provided either by the resource manager vendor or a third party.
JAVA.SQL.DRIVERMANAGER:
The primary task of the class driver manager is to manage the various
JDBC drivers register. It also provides methods for:

Getting connections to the databases.

Managing JDBC logs.

Setting login timeout.

MANAGING CONNECTION:
DriverManager class is responsible for managing connections to the databases:

43

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:
The interface java.sql.Connection defines the methods required for a persistent
connection to the database. The JDBC driver vendor implements this interface. A
database vendor-neutral client never uses the implementation class and will always use
only the interface. This interface defines methods for the following tasks:

Statements, prepared statements, and callable statements are the different


types of statements for issuing sql statements to the database by the JDBC
clients.

For getting and setting auto-commit mode.

Getting meta information about the database.

Committing and rolling back transactions.

JDBC RESULTSETS:
A JDBC resultset represents a two dimentional array of data
produced as a result of executing SQL SELECT statements against databases using JDBC
statements. JDBC resultsets are represented by the interface java.sql.ResultSet. The
JDBC vendor provider provides the implementation class for this interface.
STATEMENT:
The interface java.sql.Stament is normally used for sending SQL statements that
do not have IN or OUT parameters. The JDBC driver vendor provides the
implementation class for this interface. The common methods required by the different
JDBC statements are defined in this interface. The methods defined by java.sql.
Statement can be broadly categorized as follows:

Executing SQL statements

Querying results and resultsets

Handling SQL batches

44

Other miscellaneous methods

The interface java.sql.statements defines

methods for executing different SQL statements like SELECT, UPDATE, INSERT,
DELETE, and CREATE.
Public Resultset execute Query (string sql) throws SQLException
The following figure shows how the DriverManager, Driver, Connection, Statement,
ResultSet classes are connected.
DriverManag
er
Driver

Driver

Layer
Application

Connection

Layer
Prepared
Statement

Stateme
nt

Result Set

Result Set

Callable
Statement

Result Set

JDBC Goals
Few software packages are designed without goals in mind. JDBC is one that,
because of its many goals, drove the development of the API. These goals, in conjunction
with early reviewer feedback, have finalized the JDBC class library into a solid
framework for building database applications in Java.
The goals that were set for JDBC are important. They will give you some insight
as to why certain classes and functionalities behave the way they do. The eight design
goals for JDBC are as follows:
1.

SQL Level API

45

The designers felt that their main goal was to define a SQL interface for Java.
Although not the lowest database interface level possible, it is at a low enough level for
higher-level tools and APIs to be created. Conversely, it is at a high enough level for
application programmers to use it confidently. Attaining this goal allows for future tool
vendors to generate JDBC code and to hide many of JDBCs complexities from the end
user.
2.

SQL Conformance
SQL syntax varies as you move from database vendor to database vendor. In an

effort to support a wide variety of vendors, JDBC will allow any query statement to be
passed through it to the underlying database driver. This allows the connectivity module
to handle non-standard functionality in a manner that is suitable for its users.
3.

JDBC must be implemental on top of common database interfaces


The JDBC SQL API must sit on top of other common SQL level APIs. This goal

allows JDBC to use existing ODBC level drivers by the use of a software interface. This
interface would translate JDBC calls to ODBC and vice versa.
4.

Provide a Java interface that is consistent with the rest of the Java system

Because of Javas acceptance in the user community thus far, the designers feel that they
should not stray from the current design of the core Java system.

5.

Keep it simple
This goal probably appears in all software design goal listings. JDBC is no

exception. Sun felt that the design of JDBC should be very simple, allowing for only one
method of completing a task per mechanism. Allowing duplicate functionality only serves
to confuse the users of the API.
6.

Use strong, static typing wherever possible


Strong typing allows for more error checking to be done at compile time; also, less

errors appear at runtime.


7.

Keep the common cases simple

46

Because more often than not, the usual SQL calls used by the programmer are simple
SELECTs, INSERTs, DELETEs and UPDATEs, these queries should be simple to
perform with JDBC. However, more complex SQL statements should also be possible.
Networking
TCP/IP stack
The TCP/IP stack is shorter than the OSI one:

FIGURE 5 TCP/IP STACK


TCP is a connection-oriented protocol; UDP (User Datagram Protocol) is a
connectionless protocol.
IP datagrams
The IP layer provides a connectionless and unreliable delivery system. It
considers each datagram independently of the others. Any association between datagram
must be supplied by the higher layers. The IP layer supplies a checksum that includes its
own header. The header includes the source and destination addresses. The IP layer
handles routing through an Internet. It is also responsible for breaking up large datagram
into smaller ones for transmission and reassembling them at the other end.
47

TCP
TCP supplies logic to give a reliable connection-oriented protocol above IP. It
provides a virtual circuit that two processes can use to communicate.
Internet addresses
In order to use a service, you must be able to find it. The Internet uses an address
scheme for machines so that they can be located. The address is a 32 bit integer which
gives the IP address. This encodes a network ID and more addressing. The network ID
falls into various classes according to the size of the network address.
Network address
Class A uses 8 bits for the network address with 24 bits left over for other
addressing. Class B uses 16 bit network addressing. Class C uses 24 bit network
addressing and class D uses all 32.
Subnet address
Internally, the UNIX network is divided into sub networks. Building 11 is
currently on one sub network and uses 10-bit addressing, allowing 1024 different hosts.
Host address
8 bits are finally used for host addresses within our subnet. This places a limit of
256 machines that can be on the subnet.
Total address

48

FIGURE 6 - IP ADDRESSING
The 32 bit address is usually written as 4 integers separated by dots.
Port addresses
A service exists on a host, and is identified by its port. This is a 16 bit number. To
send a message to a server, you send it to the port for that service of the host that it is
running on. This is not location transparency! Certain of these ports are "well known".
Sockets
A socket is a data structure maintained by the system to handle network
connections. A socket is created using the call socket. It returns an integer that is like a
file descriptor. In fact, under Windows, this handle can be used with Read File and Write
File functions.
#include <sys/types.h>
#include <sys/socket.h>
int socket(int family, int type, int protocol);
Here "family" will be AF_INET for IP communications, protocol will be zero, and type
will depend on whether TCP or UDP is used. Two processes wishing to communicate
over a network create a socket each. These are similar to two ends of a pipe - but the
actual pipe does not yet exist.
6.2 JAKARTA TOMCAT

49

Tomcat is the Servlet/JSP container. Tomcat 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). 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 server.xml. It is the main configuration file for the container.
/logs Log files are here by default.
/webapps This is where webapps go\
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.
DEPLOYMENT DIRECTORIES FOR DEFAULT WEB APPLICATION:
Individual Servlet and Utility Class Files

Main Location (Classes without Packages).


$CATALINA_HOME/webapps/ROOT/WEB-INF/classes

Corresponding URL (Servlets).

50

http://host/servlet/ServletName

More Specific Location (Classes in Packages).


$CATALINA_HOME/webapps/ROOT/WEB-INF/classes/packageName

Corresponding URL (Servlets in Packages).


http://host/servlet/packageName.ServletName

Servlet and Utility Class Files Bundled in JAR Files

Location
$CATALINA_HOME/webapps/ROOT/WEB-INF/lib

Corresponding URLs (Servlets)


http://host/servlet/ServletName
http://host/servlet/packageName.ServletName

6.3 J2ME
MIDlet class defines several methods, three are particularly important to develop our own
MIDlets:

startApp( )starts a MIDlet

pauseApp()pauses a MIDlet

destroyApp()destroys a MIDlet

All the components used in the application are displayed using the Display class.

Declaration of different types of class objects like


Display : Reference to devices display can be obtained by providing a MIDlet reference
to the static getDisplay() method.
Form: which is considered as a page which is shown at a time with added objects like
Command, Text field ,text area etc

51

Command: to provide the a button and corresponding action will be performed after the
action
TextField: which is a area like a box will be displayed and it takes the input and that will
be saved in the corresponding object

chapter -7

TESTING
7 .SOFTWARE TESTING

Testing
Software testing is a critical element of software quality assurance and
represents the ultimate review of specification, design and code generation.

52

Software Testing is the process used to help identify the correctness, completeness,
security, and quality of developed computer software. Testing is a process of technical
investigation, performed on behalf of stakeholders, that is intended to reveal qualityrelated information about the product with respect to the context in which it is intended to
operate. This includes, but is not limited to, the process of executing a program or
application with the intent of finding errors. Quality is not an absolute; it is value to some
person. With that in mind, testing can never completely establish the correctness of
arbitrary computer software; testing furnishes a criticism or comparison that compares
the state and behaviour of the product against a specification. An important point is that
software testing should be distinguished from the separate discipline of Software Quality
Assurance (SQA), which encompasses all business process areas, not just testing.
There are many approaches to software testing, but effective testing of complex products
is essentially a process of investigation, not merely a matter of creating and following
routine procedure. One definition of testing is "the process of questioning a product in
order to evaluate it", where the "questions" are operations the tester attempts to execute
with the product, and the product answers with its behavior in reaction to the probing of
the tester[citation needed]. Although most of the intellectual processes of testing are
nearly identical to that of review or inspection, the word testing is connoted to mean the
dynamic analysis of the productputting the product through its paces. Some of the
common quality attributes include capability, reliability, efficiency, portability,
maintainability, compatibility and usability. A good test is sometimes described as one
which reveals an error; however, more recent thinking suggests that a good test is one
which reveals information of interest to someone who matters within the project
community.
Introduction
In general, software engineers distinguish software faults from software failures. In case
of a failure, the software does not do what the user expects. A fault is a programming
error that may or may not actually manifest as a failure. A fault can also be described as
an error in the correctness of the semantic of a computer program. A fault will become a
failure if the exact computation conditions are met, one of them being that the faulty
53

portion of computer software executes on the CPU. A fault can also turn into a failure
when the software is ported to a different hardware platform or a different compiler, or
when the software gets extended. Software testing is the technical investigation of the
product under test to provide stakeholders with quality related information.
Software testing may be viewed as a sub-field of Software Quality Assurance but
typically exists independently (and there may be no SQA areas in some companies). In
SQA, software process specialists and auditors take a broader view on software and its
development. They examine and change the software engineering process itself to reduce
the amount of faults that end up in the code or deliver faster.
Regardless of the methods used or level of formality involved the desired result of testing
is a level of confidence in the software so that the organization is confident that the
software has an acceptable defect rate. What constitutes an acceptable defect rate depends
on the nature of the software. An arcade video game designed to simulate flying an
airplane would presumably have a much higher tolerance for defects than software used
to control an actual airliner.
A problem with software testing is that the number of defects in a software product can
be very large, and the number of configurations of the product larger still. Bugs that occur
infrequently are difficult to find in testing. A rule of thumb is that a system that is
expected to function without faults for a certain length of time must have already been
tested for at least that length of time. This has severe consequences for projects to write
long-lived reliable software.
A common practice of software testing is that it is performed by an independent group of
testers after the functionality is developed but before it is shipped to the customer. This
practice often results in the testing phase being used as project buffer to compensate for
project delays. Another practice is to start software testing at the same moment the
project starts and it is a continuous process until the project finishes.
Another common practice is for test suites to be developed during technical support
escalation procedures. Such tests are then maintained in regression testing suites to
ensure that future updates to the software don't repeat any of the known mistakes.
54

It is commonly believed that the earlier a defect is found the cheaper it is to fix it.
Time Detected
Time

System

Post-Release

Requirements

Architecture

Construction

Requirements

5-10

10

10-100

Architecture

10

15

25-100

Construction

10

10-25

Introduced

Test

In counterpoint, some emerging software disciplines such as extreme programming and


the agile software development movement, adhere to a "test-driven software
development" model. In this process unit tests are written first, by the programmers
(often with pair programming in the extreme programming methodology). Of course
these tests fail initially; as they are expected to. Then as code is written it passes
incrementally larger portions of the test suites. The test suites are continuously updated as
new failure conditions and corner cases are discovered, and they are integrated with any
regression tests that are developed.
Unit tests are maintained along with the rest of the software source code and generally
integrated into the build process (with inherently interactive tests being relegated to a
partially manual build acceptance process).
The software, tools, samples of data input and output, and configurations are all referred
to collectively as a test harness.
History
The separation of debugging from testing was initially introduced by Glenford J. Myers
in his 1978 book the "Art of Software Testing". Although his attention was on breakage
testing it illustrated the desire of the software engineering community to separate
fundamental development activities, such as debugging, from that of verification. Drs.
Dave Gelperin and William C. Hetzel classified in 1988 the phases and goals in software

55

testing as follows: until 1956 it was the debugging oriented period, where testing was
often associated to debugging: there was no clear difference between testing and
debugging. From 1957-1978 there was the demonstration oriented period where
debugging and testing was distinguished now - in this period it was shown, that software
satisfies the requirements. The time between 1979-1982 is announced as the destruction
oriented period, where the goal was to find errors. 1983-1987 is classified as the
evaluation oriented period: intention here is that during the software lifecycle a product
evaluation is provided and measuring quality. From 1988 on it was seen as prevention
oriented period where tests were to demonstrate that software satisfies its specification, to
detect faults and to prevent faults. Dr. Gelperin chaired the IEEE 829-1988 (Test
Documentation Standard) with Dr. Hetzel writing the book "The Complete Guide of
Software Testing". Both works were pivotal in to today's testing culture and remain a
consistent source of reference. Dr. Gelperin and Jerry E. Durant also went on to develop
High Impact Inspection Technology that builds upon traditional Inspections but utilizes a
test driven additive.
7.1 TESTING OBJECTIVES

To ensure that during operation the system will perform as per


specification.

TO make sure that system meets the user requirements during operation

To make sure that during the operation, incorrect input, processing and
output will be detected

To see that when correct inputs are fed to the system the outputs are
correct

To verify that the controls incorporated in the same system as intended

Testing is a process of executing a program with the intent of finding an


error

A good test case is one that has a high probability of finding an as yet
undiscovered error

56

The software developed has been tested successfully using the following testing
strategies and any errors that are encountered are corrected and again the part of the
program or the procedure or function is put to 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.,
7.2 TEST CASE DESIGN:
White box testing
White box testing is a testing case design method that uses the control structure of
the procedure design to derive test cases. All independents path in a module are exercised
at least once, all logical decisions are exercised at once, execute all loops at boundaries
and within their operational bounds exercise internal data structure to ensure their
validity. Here the customer is given three chances to enter a valid choice out of the given
menu. After which the control exits the current menu.
Black Box Testing
Black Box Testing attempts to find errors in following areas or categories,
incorrect or missing functions, interface error, errors in data structures, performance error
and initialization and termination error. Here all the input data must match the data type
to become a valid entry.
The following are the different tests at various levels:
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:
57

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
This testing concentrates on confirming that the software is error-free in all
respects. All the specified validations are verified and the software is subjected to hardcore testing. It also aims at determining the degree of deviation that exists in the software
designed from the specification; they are listed out and are corrected.
System Testing
This testing is a series of different tests whose primary is to fully exercise the
computer-based system. This involves:

Implementing the system in a simulated production environment and testing it.

Introducing errors and testing for error handling.

7.3 TEST CASES


TEST CASE 1:
Test case for Request Password form:
When a user enters invalid account number , then this result in displaying error message
Invalid account number.
TEST CASE 2:
Test case for checking password through Mobile:

58

When a customer wants to view his new password he has to provide his mobile number.
If he or she entered a invalid mobile number it says that Not Authorized other wize it
will display new password.
TEST CASE 3:
Validation in login Form:
If customer enters invalid user name or password it will not entered into
application it will shows the error message as Invalid username or password

chapter -8

OUTPUT SCREENS
8. OUTPUT SCREENS

Home Page

59

Login Screen

60

Connect

61

62

63

Change Password

64

65

Cheque Application Form

66

67

Cheques Withdrawal Form

68

MiniStatement

69

View Bills

70

9. CONCLUSION
The Mobile Banking project has been successfully completed. The goal
of the system is achieved and the problems are solved. This project is developed in this
manner that is user friendly and required help is provided at different levels.
The primary objective is to provide the interactive service to all the
Customers. Different types of services are provided to both the admin and customer.
Customer can avail this service any time.

71

10 APPENDIX
FAQS
What is java script?
Java script is a compact, object based scripting language for developing
client and server internet applications.
Client vs server side java script?
Client side java script is interpreted only with in the browser that support it, and the
code is visible to the user. Server side java script is stored in a pre-compiled state on the
server, so it is browser independent, and only the results of the java script programs are
passed to the browser, so that code is never revealed.
Where can <script> container tags be placed with in an html document?
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.

72

11 BIBILIOGRAPHY
Advanced Java Programming
Mastering JAVA 2

- Dietel and Dietel


- John Zukowski

Java Server Programming

- Apress

Software Engineering

- Roger S Pressman

Anlysis & Design of InformationSystems Senn

73

12 Reference Websites
www.google.com
Reference for J2ME:
http://www.ibm.com/developerworks/library/wi-midlet2/
www.askjeeves.com
Referred for JAVA MAIL API to:
http://www.ibm.com/developerworks/java/library/j-james1.html
Reference for Encryption:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?
topic=/com.ibm.websphere.express.doc/info/exp/ae/csec_pubki.html

74

Vous aimerez peut-être aussi