Professional Documents
Culture Documents
1
explosion of financial data has brought organizational managers to
recognize that only computerized system can produce results which
meet all the above four criteria. The basic reason is that the speed
accuracy of the computer provides rapid classification and
manipulation back volumes of data.
2
SYSTEM
ANALYSIS &
DESIGN
3
SYSTEM ANALYSIS AND DESIGN
Defining A System
Input Output
Processing
Problem Definition
Systems analysis
4
Data flow analysis
Feasibility study
Systems design
Updating
Testing
Implementation
Maintenance
SYSTEM ANAYSIS
5
areas. Hence an early step in the analysts investigation is to
understand the situation .Certain types of requirements are so
fundamental as to be common in most situations.
BASIC PROCESS:
ACCOUNT MAINTAINANCE
NEW ACCOUNT
MODIFY ACCOUNT
CLOSE ACCOUNT
6
TRANSACTIONS
Daily Transactions.
REPORT GENERATION
List of account.
Pass book of account.
Monthly report of account.
7
FEASIBILITY
STUDY
FEASIBILITY STUDY
8
Is there a new and a better way to do the job that will
benefit the user ?
What are the costs & savings of the alternatives?
What is recommended?
TYPES OF FEASIBILITY
ECONOMIC FEASIBILITY:
9
TECHNICAL FEASIBILITY:
BEHAVIORAL FEASIBILITY:
BENEFITS
10
Orderly and efficient manipulation of customer
accounts.
Efficient modification updating of user accounts.
Enough constraints have been added to maintain data
validity and consistency.
Quick and easy report generation for pass books w.r.t
entries up to a particular date.
You can easily print or save the generated report for
future reference.
Easy access to data being saved in individual costumer
file.
Easy querying about the status of the account.
Easy closing of a particular account without any
inconsistency in the saved data.
FEASIBILITY ANALYSIS
11
Describe and identify characteristics of candidate
systems.
Determine and evaluate performance and cost
effectiveness of each candidate system.
Weight system performance and cost data.
Select the best candidate system.
Prepare and report final project directive to
management.
12
SOFTWARE
ENGINEERING
TOOL
13
living system or a new product. System analysis and design
are keyed to system life cycle. The stages are shown below.
Recognition of need
Feasibility study
Analysis
Design
Implementation
14
Secondly the system development life cycle takes too long.
Analyst seem to get bogged down with tedious
methodologies for developing system.
In these situation where the requirements of the user are not
clear prototyping model may offer best approach.
15
MODEL USED
FOR
SYSTEM
DEVELOPMENT
16
Prototyping model is an advanced technique. Prototyping
recognizes problems of cognitive style and uses advanced
computer technology. It advocates building a simple system
through trial and error and refining it through an iterative
process.
The basic steps are:
1 Identify the users information and operating
requirements.
2 Develop a working prototype that focuses on only the
most important function, using a basic data base.
3 Allow the user to use the prototype, discuss requested
changes and implement the most important changes.
4 Repeat the next version of the prototype with further
changes incorporated until the system fully meets user
requirements.
17
Revised through
Iterative process
18
DFD & Data
Dictionary
19
One of the tools of Structured Analysis is the Data Flow Diagram. A
Data Flow Diagram is a graphic documentation of a system. Data
Flow Diagrams server two purposes :
A Data Flow Diagram only shows the flow of data and not the
physical movement of goods. A Data Flow Diagram needs to be
simple because a user to go through it, understand it and suggestion
corrections or changes. A Data Flow Diagram uses only four basic
elements.
20
2. Data Flow : A Data flow portrays an interface among
different components in a Data Flow Diagram, it represents
the path of data as it flows through a system. It is
represented by an arrow, the arrow head points in the
direction in which the data moves. The name of the data flow
is written along the line. In our system it is Payment, Valid-
payment, Deposit, Valid-Deposit.
21
Whenever an account holder wants to withdraw some cash he
presents a cheque or withdrawal slip. The account is chequed for
the requisite balance. If the necessary balance exists, the cash is
paid and the account is updated. The account holders pass book
is updated, indicating the withdrawal. The direction of arrows
leading to or from a data store is significant. The arrow point
towards the data store means that account is being updated into a
data store. While the arrow pointing away from the data store
indicates that the data is being read.
Withdrawal Acknowledgement
Enter
Amount
Valid Withdrawn
Balance
C
Cheque Verify
Account Balance
Holder
Account Master
22
Data Dictionary :
In our project the data store would contain details regarding holder of
account no like name of the account holder, his or her address and
the initial amount he or she deposits while opening the account.
23
DATA FLOW DIAGRAMS
A Data flow diagram is a way of expressing system
requirements in graphical form. It is also known as a bubble
chart which has the purpose of clarifying system
requirements and identifying major transformations that will
become program in system design.
Source
24
Process1 Destination
1. Data Flow
25
2 Process
3. Source or Destination
4. Data Store
26
ACCOUNT-NO Data Structure
Name
Address
Introducing_Person Data Elements
Initial_Deposit
Data Dictionary
27
FLOW CHART
FLOW CHARTS
Types of flowcharts
There are two types of flow charts that are most commonly used in
quality improvement projects - macro and deployment.
28
They can be used to provide a quick representation of a process and
to compare several processes to identify improvement areas
Yes
Choice = =1 N
Yes
Choice = =2 L
No
Yes
Choice = =3 I
No
Yes
Choice = =4 D
No
Yes
Choice = =5 M
No
Yes
Main menu Choice = =E E
No
29
Stop
I
Individual Accounts
If Yes
t_accno= t_acc A
No
No
A If!found_account
(t_accno)
Yes
Box_for_
display(t_accno)
open self.dat
Read file
Yes
want=wamt+amount
tamt=tamt+amount return
If tran==D
No
Yes
want=wamt+amount close self.dat
tamt=tamt-amount If tran==W
D
Deposit/Withdrawal
If Yes
t_accno= 0 A
A
No
No
Account No. If!found_account
Not Found (t_accno)
Yes
Return_name(t_accno)
Return_address(t_acc_no)
give_balance(t_accno)
Deposit or
Withdraw
Yes
A If t_tran= =0
No
Enter by Cash
I or Cheque
If t_type= =cash ||
t_type= =cheque
Enter Amount
31 J
Deposit/Withdrawal Transaction contd
If Yes
t_amount== 0 A
No
I
t_amount=0
Invalid Data
If Yes
t_tran== W &&
t_amount>t_balance
No
Save transaction
If No A
ch == y
Yes
Calculate_interest()
If
t_tran== D
Yes
No
t_balance=t_balance
+ t_amount
If
t_tran== W
Yes
t_balance=t_balance
- t_amount
Update_balance()
add_to_file()
32
Return
FRONT AND BACKENED
33
FRONT & BACKENED USED
JAVA
34
checking these programs for bugs or for out-and-out malicious behavior
before downloading and running them.
Java solves this problem by severely restricting what an applet can do. A
Java applet cannot write to your hard disk without your permission. It cannot
write to arbitrary addresses in memory and thereby introduce a virus into
your computer. It should not crash your system.
JAVA IS PLATFORM
35
Java solves the problem of platform-independence by using byte code. The
Java compiler does not produce native executable code for a particular
machine like a C compiler would. Instead it produces a special format called
JAVA IS SIMPLE:
Java was designed to make it much easier to write bug free code. According
to Sun's Bill Joy, shipping C code has, on average, one bug per 55 lines of
code. The most important part of helping programmers write bug-free code
is keeping the language simple.
Java has the bare bones functionality needed to implement its rich feature
set. It does not add lots of syntactic sugar or unnecessary features. Despite
its simplicity Java has considerably more functionality than C, primarily
because of the large class library.
Because Java is simple, it is easy to read and write. Obfuscated Java isn't
nearly as common as obfuscated C. There aren't a lot of special cases or
tricks that will confuse beginners.
About half of the bugs in C and C++ programs are related to memory
allocation and deallocation. Therefore the second important addition Java
makes to providing bug-free code is automatic memory allocation and
deallocation. The C library memory allocation functions malloc() and free()
are gone as are C++'s destructors.
36
Java is an excellent teaching language, and an excellent choice with which to
learn programming. The language is small so it's easy to become fluent. The
language is interpreted so the compile-run-link cycle is much shorter. The
runtime environment provides automatic memory allocation and garbage
collection so there's less for the programmer to think about. Java is object-
oriented unlike Basic so the beginning programmer doesn't have to unlearn
bad programming habits when moving into real world projects. Finally, it's
very difficult (if not quite impossible) to write a Java program that will crash
your system, something that you can't say about any other language.
JAVA IS OBJECT-ORIENTED:
37
Simpler, easier to read programs
More efficient reuse of code
Faster time to market
Java was designed to not only be cross-platform in source form like C, but
also in compiled binary form. Since this is frankly impossible across
processor architectures Java is compiled to an intermediate form called byte-
code. A Java program never really executes natively on the host machine.
Rather a special native program called the Java interpreter reads the byte
code and executes the corresponding native machine instructions. Thus to
port Java programs to a new platform all that is needed is to port the
interpreter and some of the library routines. Even the compiler is written in
Java. The byte codes are precisely defined, and remain the same on all
platforms.
38
However the virtual machine itself and some parts of the class library must
be written in native code. These are not always as easy or as quick to port as
pure Java programs.
HTML
HYPERTEXT MARKUP LANGUAGE
39
Hypertext Markup Language] was published by the IETF as an
Internet-Draft (a rough proposal for a standard). It expired in January
1994.
November 1993
HTML was published by the IETF as an Internet-Draft and was a
competing proposal to the Hypertext Markup Language draft. It
expired in May 1994.
April 1995 (authored March 1995)
HTML 3.0 was proposed as a standard to the IETF, but the proposal expired
five months later without further action. It included many of the capabilities
that were in Raggett's HTML+ proposal, such as support for tables, text flow
around figures, and the display of complex mathematical formulas.
[edit] Elements
See HTML elements for more detailed descriptions.
Elements are the basic structure for HTML markup. Elements have
two basic properties: attributes and content. Each attribute and each
element's content has certain restrictions that must be followed for an
HTML document to be considered valid. An element usually has a
start tag (e.g. the designation class="notation" to indicate that all
40
elements with this class value are subordinate to the main text of the
document. Such elements might be gathered together and presented as
footnotes on a page instead of appearing in the place where they occur
in the HTML source.
Most elements also take the language-related attributes lang and dir.
As of version 4.0, HTML defines a set of 252 character entity references and
a set of 1,114,050 numeric character references, both of which allow
individual characters to be written via simple markup, rather than literally. A
literal character and its markup counterpart are considered equivalent and
are rendered identically.
The ability to "escape" characters in this way allows for the characters < and
& (when written as < and &, respectively) to be interpreted as
character data, rather than markup. For example, a literal < normally
41
indicates the start of a tag, and & normally indicates the start of a character
entity reference or numeric character reference; writing it as & or &
or & allows & to be included in the content of elements or the values of
attributes. The double-quote character ("), when used to quote an attribute
value, must also be escaped as " or " or " when it appears
within the attribute value itself. The single-quote character ( '), when used to
quote an attribute value, must also be escaped as ' or ' (should
NOT be escaped as ' except in XHTML documents) when it appears
within the attribute value itself. However, since document authors often
overlook the need to escape these characters, browsers tend to be very
forgiving, treating them as markup only when subsequent text appears to
confirm that intent.
Escaping also allows for characters that are not easily typed or that aren't
even available in the document's character encoding to be represented within
the element and attribute content. For example, the acute-accented e (), a
character typically found only on Western European keyboards, can be
written in any HTML document as the entity reference é or as the
numeric references é or é. The characters comprising those
references (that is, the &, the ;, the letters in eacute, and so on) are available
on all keyboards and are supported in all character encodings, whereas the
literal is not.
HTML defines several data types for element content, such as script data and
stylesheet data, and a plethora of types for attribute values, including IDs,
names, URIs, numbers, units of length, languages, media descriptors, colors,
42
character encodings, dates and times, and so on. All of these data types are
specializations of character data.
This declaration references the Strict DTD of HTML 4.01, which does not
have presentational elements like <font>, leaving formatting to Cascading
Style Sheets and the span and div tags. SGML-based validators read the
DTD in order to properly parse the document and to perform validation. In
modern browsers, the HTML 4.01 Strict doctype activates standards layout
mode for CSS as opposed to quirks mode.
43
EDIT SEMANTIC LANGUAGE: There is no official specification
called "Semantic HTML", though the strict flavors of HTML discussed
below are a push in that direction. Rather, semantic HTML refers to an
objective and a practice to create documents with HTML that contain only
the author's intended meaning, without any reference to how this meaning is
presented or conveyed - the doctrine of separation of presentation and
content. A classic example is the distinction between the emphasis element
(<em>) and the italics element (<i>). Often the emphasis element is displayed
in italics, so the presentation is typically the same. However, emphasizing
something is different from listing the title of a book, for example, which
may also be displayed in italics. In purely semantic HTML, a book title
would use a different element than emphasized text uses (for example a
<span>), because they are meaningfully different things.
44
Semantic HTML also requires complementary specifications and software
compliance with these specifications. Primarily, the development and
proliferation of CSS has led to increasing support for semantic HTML,
because CSS provides designers with a rich language to alter the
presentation of semantic-only documents. With the development of CSS, the
need to include presentational properties in a document has virtually
disappeared. With the advent and refinement of CSS and the increasing
support for it in Web browsers, subsequent editions of HTML increasingly
stress only using markup that suggests the semantic structure and phrasing
of the document, like headings, paragraphs, quotes, and lists, instead of
using markup which is written for visual purposes only, like <font>, <b>
(bold), and <i> (italics). Some of these elements are not permitted in certain
varieties of HTML, like HTML 4.01 Strict. CSS provides a way to separate
document semantics from the content's presentation, by keeping everything
relevant to presentation defined in a CSS file. See separation of style and
content.
Second, semantic HTML frees authors from the need to concern themselves
with presentation details. When writing the number two, for example, should
it be written out in words ("two"), or should it be written as a numeral (2)? A
semantic markup might enter something like <number>2</number> and
leave presentation details to the stylesheet designers. Similarly, an author
might wonder where to break out quotations into separate indented blocks of
text: with purely semantic HTML, such details would be left up to stylesheet
45
designers. Authors would simply indicate quotations when they occur in the
text, and not concern themselves with presentation.
46
EDIT DELIVERY OF HTML:
[edit] HTTP
In modern browsers, the MIME type that is sent with the HTML document
affects how the document is interpreted. A document sent with an XHTML
MIME type, or served as application/xhtml+xml, is expected to be well-
formed XML, and a syntax error causes the browser to fail to render the
document. The same document sent with an HTML MIME type, or served
as text/html, might be displayed successfully, since Web browsers are more
47
lenient with HTML. However, XHTML parsed in this way is not considered
either proper XHTML or HTML, but so-called tag soup.
If the MIME type is not recognized as HTML, the Web browser should not
attempt to render the document as HTML, even if the document is prefaced
with a correct Document Type Declaration. Nevertheless, some Web
browsers do examine the contents or URL of the document and attempt to
infer the file type, despite this being forbidden by the HTTP 1.1
specification.
Most graphical e-mail clients allow the use of a subset of HTML (often ill-
defined) to provide formatting and semantic markup capabilities not
available with plain text, like emphasized text, block quotations for replies,
and diagrams or mathematical formulas that could not easily be described
otherwise. Many of these clients include both a GUI editor for composing
HTML e-mail messages and a rendering engine for displaying received
HTML messages. Use of HTML in e-mail is controversial because of
compatibility issues, because it can be used in phishing/privacy attacks,
because it can confuse spam filters, and because the message size is larger
than plain text.
The most common filename extension for files containing HTML is .html. A
common abbreviation of this is .htm; it originates from older operating
systems and file systems, such as the DOS versions from the 80s and early
90s and FAT, which limit file extensions to three lette
48
MICROSOFT ACCESS
Access version 1.0 was released in November 1992, followed in May of
1993 by an Access 1.1 release to improve compatibility with other Microsoft
products.
The software worked well with small recordsets but testing showed some
circumstances caused data corruption. For example, file sizes over 10 MB
were problematic (note that most hard disks were smaller than 500 MB at
the time this was in wide use). The Getting Started manual warns about a
number of circumstances where obsolete device drivers or incorrect
configurations can cause data loss. However, in recent years with the
phasing out of Windows 95, 98 and ME, improved network reliability and
Microsoft having released eight service packs for the Jet Database Engine,
the reliablity of Access databases has been vastly improved.
49
Access's initial codename was Cirrus; the forms engine was called Ruby.
This was before Visual Basic - Bill Gates saw the prototypes and decided
that the BASIC language component should be co-developed as a separate
expandable application, a project called Thunder. The two projects were
developed separately as the underlying forms engines were incompatible
with each other; however, these were merged together again after VBA.
[edit] Uses
Microsoft has strongly recommended for the past decade that Jet databases
are inappropriate for basic web based applications hosted on Microsoft's
Internet Information Services and utilizing Microsoft Active Server Pages
ASP.
Applications that are used by more than a handful of people tend to rely on
Client-Server based solutions. However, an Access "front end" (the forms,
reports, queries and VB code) can be used against a host of database
backends, including JET (file-based database engine, used in Access by
50
default), Microsoft SQL Server, Oracle, and all other ODBC-compliant
product.
[edit] Features
Starting in Access 2000 (Jet 4.0), there is a new syntax for creating queries
with parameters, in a way that looks like creating stored procedures, but
these procedures are still limited to one statement per procedure.
51
In ADP files (supported in Access 2000 and later), the database-related
features are geared more towards a client-server architecture with MSDE or
52
Project Analysis
53
PROJECT ANALYSIS
1. First of all is the opening of the new account where bank clerk
have to look in his register the last account no. given to the
individual which consumes a lot of time. Second is the problem
of duplicate account no, if by mistake he gives same account to
the person which has already been given, then he faces a lot of
problem once the transactions takes place and it can land into
mess.
54
amount. This leads to redundancy and can also leads to
inconsistency. The problem of redundancy leads to
inconsistency as the details of the individual account are being
maintained at two or more places, incorrect or missing entry in
any one leads to a problem which takes lot of energy and time
to find and rectify it.
5. More manual work means more human power and paper. This
leads to use of lot of space, time and in maintaing them. Natural
disasters, clematis, animal menace, theft, fire & human nature
are the other factors which makes manual job for difficult and
challenging.
55
they can easily be stolen and records can be manipulated
which effects the credibility and trust in the banking system.
The main feature of the online banking system is its feature of menu
driven and user friendly interface :
56
3. It becomes very easy for bank people to maintain user details
at one place, they can know all the details of the accounts
opened so far in their bank, their daily transactions, monthly
reports etc.
6. With proper regular backup at the end of the day and keeping
multiple copies of the data and at different locations reduces the
risk of data loss, theft, and other natural and manmade
problems.
57
SYSTEM TESTING
58
SYSTEM TESTING
59
Testing Mechanism used
60
As in this system data is entered at different levels, I considered
providing automatic generation of account numbers and hence avoid
duplicate account numbers, the entry of name and address of the
customer is compulsory, customer has to deposit minimum Rs. 500
as the initial money other wise his or her account number is not
opened. One can edit his or her profile at the later stage in the edit
account module.
Since the software menu driven and user friendly the data screens
are designed in such a way that they were:
Consistent
Esay to use
Had a fast response time
61
The software is divided into different functions which are called in
the main programs.
Error and validation messages are provided wherever required.
Testing Procedures
State-Based Testing
62
In the state-based testing technique all methods of an object are
tested one at a time. A method is involved in all possible states that
the object can assume, and after each invocation the resulting state
is checked to see whether or not the method takes the object under
test to the expected state. In this form of testing, emphasis is on the
interaction between methods, that is whether the method is
communicating properly with other methods of the object through the
state of the object.
Unit Testing
Integration Testing
System Testing
63
System Testing is the testing of the system against its initial
objectives. It is done either in a simulated environment or in a live
environment.
Stress Test
Test Review
Test Review is the process, which ensures that testing is carried out
as planned. Test Review decides whether or not the program is ready
to be shipped out for implementation.
For each data entry screen, I prepared test data with extreme values
and tested under all relevant test conditions. After the relevant data -
entry screens against real data.
64
FUTURE SCOPE OF THE PROJECT
65
Once we have good experience with the package we can make it a
networking package so that the package is not confined to a
standalone machine and can be handled from any counter which will
greatly reduce the ones man job.
66
SNAP SHOTS
67
68
69
70
71
72
73
74
75
76
77
CODING
import java.io.*;
import javax.servlet.*;
import java.sql.*;
import javax.servlet.http.*;
String s1=req.getParameter("user");
String s2=req.getParameter("pwd");
try{
78
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select name from pass where
name='"+s1+"'");
if (rs.next())
{
pw.println("User already exist");
}
else
if(s1.equals("")||s2.equals(""))
{
pw.println("invalid");
res.sendRedirect("http://localhost:8080p/tball.gif");
}
else
{
PreparedStatement pst=con.prepareStatement("insert into pass
values(?,?)" );
pst.setString(1,s1);
pst.setString(2,s2);
pst.execute();
Statement s12=con.createStatement();
ResultSet rs1=s12.executeQuery("select max(accno) from auser");
rs1.next();
int accno=rs1.getInt(1);
79
accno++;
}
catch(Exception ee)
{
80
System.out.println(ee);
}
}
System.out.println(s1);
System.out.println(s2);
System.out.println(s3);
System.out.println(s4);
System.out.println(s5);
System.out.println(s6);
System.out.println(s7);
System.out.println(s8);
System.out.println(s9);
System.out.println(s10);
System.out.println(s11);
81
System.out.println(s12);
try{
PreparedStatement pst=con.prepareStatement("insert into entry
values(?,?,?,?,?,?,?,?,?,?,?,?)" );
pst.setString(1,s1);pst.setString(2,s2);pst.setString(3,s3);pst.setString(4,s4)
;
pst.setString(5,s5);pst.setString(6,s6);pst.setString(7,s7);pst.setString(8,s8)
;
pst.setString(9,s9);pst.setString(10,s10);pst.setString(11,s11);pst.setString(
12,s12);
pst.execute();
}
catch(Exception e)
{System.out.println(e);}
PrintWriter pw=res.getWriter();
res.setContentType("text/html");
pw.println("inserted.into table..");
}
}import java.io.*;
import javax.servlet.*;
import java.sql.*;
import javax.servlet.http.*;
82
public class Client3 extends HttpServlet
{
Connection con;
String s3="",s4="";
83
pw.println("<center><form name=f1
action='http://localhost:8080/servlet/Transaction2' method=get><pre>");
pw.println(" Enter UserId :<input type=text name=t1
value="+c[0].getValue()+" size=20 onfocus=\"a1()\">");
pw.println("Password :<input type=password name=t2
size=20></pre><br>");
pw.println("Amt :<input type=text name=t3 size=20></pre><br>");
pw.println("Trans type:<select name=t4><option
value='Withdrawl'>Withdrawl<option value='Deposit'>Deposit</select>");
}
} import java.io.*;
import javax.servlet.*;
import java.sql.*;
import javax.servlet.http.*;
84
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:aravind");
}catch(Exception ee){System.out.println(ee);}
}
85
pw.println("<input type=reset value='clear'><br><br> ");
pw.println("<a href='http://localhost:8080/home.html' target=_top><img
src='http://localhost:8080/home[1].gif' height=40 width=40 align=right></a>
");
pw.println("HELLO "+c[0].getValue());
pw.println("</form></body></html>");
}
} import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
double amount,i;
Connection con;
public void init(ServletConfig sc)throws ServletException
{
super.init(sc);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:aravind");
}catch(Exception e){ System.out.println(e);}
}
public void doGet(HttpServletRequest req,HttpServletResponse res)throws
ServletException,IOException
86
{
res.setContentType("text/html");
PrintWriter pw=res.getWriter();
s1= req.getParameter("user");
s2=req.getParameter("pwd");
System.out.println(s1);
System.out.println(s2);
try{
//accountno,usid,pwd,balance from transact where usid='"+s1+"'");
con.commit();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select
USER_ID,PUBLIC_KEY,ACCNO,BALANCE from auser where
user_id='"+s1+"'");
if (rs.next())
{
//System.out.println(s1); System.out.println(s2);
s3=rs.getString(1);
s4=rs.getString(2);
s5=rs.getString(3); //getString(3);
i=rs.getDouble(4);
87
}
// System.out.println(s3); System.out.println(s4);
if(s3.equals(s1)&& s4.equals(s2))
{
System.out.println(s3);
System.out.println(s4);
Cookie uname=new Cookie("user",s1);
Cookie uaccno=new Cookie("acc",s5);
pw.println("<html><head><center>");
pw.println("<h2><u><b><i>WELCOME TO
BANKING</i></b></u></h2></center>");
pw.println("</head><a href='http://localhost/aboutus.html'>");
pw.println("<img src='http://localhost/home2[1].gif' align=right></a>");
pw.println(" <body bgcolor=yellow
background='http://localhost:8080/backgrnd[2].gif' text=red >");
pw.println(" <font face=arial size=5 color=blue><br><br>");
pw.println("<center><h3><i><b>STATEMENT</b></i></h3></center></font>"
);
pw.println(" <br><center>");
pw.println("<table border=22 bgcolor=yellow bordercolor=blue>");
pw.println("<tr><td bordercolor=blue bordercolorlight=maroon align=center
>");
//pw.println("<a href='http://localhost/statement.html'>Statement</td>");
pw.println("<td align=center>");
pw.println("<a href='http://localhost:8080/servlet/Client3'
target=_top>Transaction</td>");
//transaction2
pw.println("<td align=center>");
pw.println(" <a
href='http://localhost/usermanager.html'>UserManager</td>");
88
pw.println("<td align=center><a href='http://localhost/logout.html'
target=_top>Logout</td>");
pw.println("</tr></table>");
pw.println("<form ><center><pre>Name :<input type=text name=t1 size=20
value="+s3+" DISABLED>");
pw.println("Account No"+"<input type=text name=t2 size=20 value="+s5+"
DISABLED ><br>");
pw.println("<h4>The Balance in Your Account is RS :");
pw.println("<input type=text name=t3 value="+i+" DISABLED>");
pw.println("<br><br></center></pre><center><p>");
//pw.println("<input type=button name=b1 value=statement>");
//pw.println("<input type=button name=b2 value=Query>");
pw.println("</center></p></form></body></html>");
res.addCookie(uname);
res.addCookie(uaccno);
}
else
{
res.sendRedirect("http://localhost/invalid1.html");
}
//System.out.println(s3);
}catch(Exception e1){ System.out.println(e1);}
}
}control panel->Administrative Tools->Data Sources(ODBC)->System DSN-
>Add -> select (Microsoft Access Driver(*.mdb)->Data Source
Name(aravind)->DataBase select(D:\internetbanking\db2.mdb); import
java.io.*;
import javax.servlet.*;
import java.sql.*;
import javax.servlet.http.*;
89
public class Loan extends HttpServlet
{
Connection con;
String s3="",s4="";
90
pw.println("Your AccNo :<input type=text name=t1 value="+c[1].getValue()
+" size=20 onfocus=\"a2()\"><br><br>");
pw.println("Loan_id:<input type=text name=t2 size=20><br><br>");
pw.println("Amount :<input type=text name=t3 size=20><br><br>");
pw.println("<input type=submit value=' OK '>");
pw.println("<input type=reset value=cancel>");
pw.println("</form></center></body></html>");
}
} import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
public class SaveToLoan extends HttpServlet
{
Connection con;
Statement s1,s2;
PreparedStatement ps1,ps2,ps3,ps4,ps5,ps6;
Statement st;
ResultSet rs1,rs2,rs3,rs6;
String a[]=new String[2];
public void init(ServletConfig conf)throws ServletException
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:aravind");
}catch(Exception e)
{ System.out.println(e); }
}
91
public void doGet(HttpServletRequest req,HttpServletResponse res) throws
ServletException,IOException
{
try{
res.setContentType("text/html");
PrintWriter pw=res.getWriter();
int accno=Integer.parseInt(req.getParameter("t1"));
int taccno=Integer.parseInt(req.getParameter("t2"));
int amount=Integer.parseInt(req.getParameter("t3"));
pw.println(taccno+amount);
//UPDATION STARTED
s1=con.createStatement();
s2=con.createStatement();
int h=s1.executeUpdate("update auser set
balance=balance-"+amount+"where accno="+accno);
int j=s2.executeUpdate("update auser set
balance=balance+"+amount+"where accno="+taccno);
pw.println("updated");
//UPDATION COMPLETED
92
i++;
}
pw.println(a[0]);
pw.println(a[1]);
System.out.println(a[0]+a[1]);
System.out.println("hello");
String userid=a[0];
String userid1=a[1];
ps2=con.prepareStatement("select nvl(max(transaction_id),0)+1 from
atransact where to_char(transaction_date,'dd-mon-
yyyy')=to_char(sysdate,'dd-mon-yyyy')");
rs2=ps2.executeQuery();
rs2.next();
int tno=rs2.getInt(1);
ps3=con.prepareStatement("select sysdate from dual");
rs3=ps3.executeQuery();
rs3.next();
java.sql.Date d1=rs3.getDate(1);
93
ps4.setDate(5,d1);
ps4.setInt(6,tno);
int k=ps4.executeUpdate();
st=con.createStatement();
ps6=con.prepareStatement("select nvl(max(transaction_id),0)+1 from
atransact where to_char(transaction_date,'dd-mon-
yyyy')=to_char(sysdate,'dd-mon-yyyy')");
rs6=ps6.executeQuery();
rs6.next();
int tno1=rs6.getInt(1);
System.out.println("debiting");
String ttype="CREDIT";
ps5=con.prepareStatement("insert into atransact values(?,?,?,?,?,?)");
ps5.setString(1,userid1);
ps5.setInt(2,taccno);
ps5.setString(3,ttype);
ps5.setInt(4,amount);
ps5.setInt(6,tno1);
ps5.setDate(5,d1);
int l=ps5.executeUpdate();
pw.println("<h1>AMOUNT PAID</h1>");
rs1.close();
rs2.close();
rs3.close();
ps1.close();
ps2.close();
ps3.close();
ps4.close();
94
ps5.close();
// ps6.close();
}catch(Exception ee){System.out.println(ee);}
}
}
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
public class SaveToSave extends HttpServlet
{
Connection con;
Statement s1,s2;
PreparedStatement ps1,ps2,ps3,ps4,ps5,ps6,ps7,ps8;
Statement st;
ResultSet rs1,rs2,rs3,rs6;
String a[]=new String[2];
public void init(ServletConfig conf)throws ServletException
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:aravind");
}catch(Exception e)
{ System.out.println(e); }
}
95
public void doGet(HttpServletRequest req,HttpServletResponse res) throws
ServletException,IOException
{
try{
res.setContentType("text/html");
PrintWriter pw=res.getWriter();
int accno=Integer.parseInt(req.getParameter("t1"));
int taccno=Integer.parseInt(req.getParameter("t2"));
int amount=Integer.parseInt(req.getParameter("t3"));
pw.println(taccno+amount);
//UPDATION STARTED
s1=con.createStatement();
s2=con.createStatement();
int h=s1.executeUpdate("update auser set
balance=balance-"+amount+"where accno="+accno);
int j=s2.executeUpdate("update auser set
balance=balance+"+amount+"where accno="+taccno);
pw.println("updated");
//UPDATION COMPLETED
96
a[i]=rs1.getString(1);
i++;
}
pw.println(a[0]);
pw.println(a[1]);
System.out.println(a[0]+a[1]);
System.out.println("hello");
String userid=a[0];
String userid1=a[1];
ps2=con.prepareStatement("select nvl(max(transaction_id),0)+1 from
atransact where to_char(transaction_date,'dd-mon-
yyyy')=to_char(sysdate,'dd-mon-yyyy')");
rs2=ps2.executeQuery();
rs2.next();
int tno=rs2.getInt(1);
ps3=con.prepareStatement("select sysdate from dual");
rs3=ps3.executeQuery();
rs3.next();
java.sql.Date d1=rs3.getDate(1);
97
ps4.setInt(4,amount);
ps4.setDate(5,d1);
ps4.setInt(6,tno);
int k=ps4.executeUpdate();
st=con.createStatement();
ps6=con.prepareStatement("select nvl(max(transaction_id),0)+1 from
atransact where to_char(transaction_date,'dd-mon-
yyyy')=to_char(sysdate,'dd-mon-yyyy')");
rs6=ps6.executeQuery();
rs6.next();
int tno1=rs6.getInt(1);
System.out.println("debiting");
String ttype="CREDIT";
ps5=con.prepareStatement("insert into atransact values(?,?,?,?,?,?)");
ps5.setString(1,userid1);
ps5.setInt(2,taccno);
ps5.setString(3,ttype);
ps5.setInt(4,amount);
ps5.setInt(6,tno1);
ps5.setDate(5,d1);
int l=ps5.executeUpdate();
pw.println("<h1>AMOUNT TRANSFERED</h1>");
rs1.close();
rs2.close();
rs3.close();
ps1.close();
ps2.close();
ps3.close();
98
ps4.close();
ps5.close();
// ps6.close();
}catch(Exception ee){System.out.println(ee);}
}
}
import java.io.*;
import javax.servlet.*;
import java.sql.*;
import javax.servlet.http.*;
99
PrintWriter pw=res.getWriter();
res.setContentType("text/html");
Cookie c[]=req.getCookies();
System.out.println(c[1].getValue());
pw.println("<html><head><center><h2><u><i>Savings to Savings
Screen</i></u></h2></center>");
pw.println("<title>SAVINGS SCREEN</title>");
pw.println("<script language='JavaScript'>");
pw.println("function a1(){");
pw.println("alert(\"sorry ,you can't change it\")");
pw.println("document.f2.t2.select()}");
pw.println("</script></head>");
pw.println("<br><br><body bgcolor=pink text=green><center><form
name=f2 action=\"http://localhost:8080/servlet/SaveToSave\">");
pw.println("<u>Your AccNo</u> :<input type=text name=t1
value="+c[1].getValue()+" size=20 onfocus=\"a1()\"><br><br>");
pw.println("<u>To Accno:</u><input type=text name=t2
size=20><br><br>");
pw.println("<u>Amount :</u><input type=text name=t3
size=20><br><br>");
pw.println("<input type=submit value=' OK '>");
pw.println("<input type=reset value=cancel>");
pw.println("</form></center></body></html>");
}
}
100
CONCLUSION
101
BIBLIOGRAPHY & REFERENCES
102