Professional Documents
Culture Documents
Submitted in partial fulfillment of the requirement for the award of the Diploma of (COMPUTER SCIENCE & TECHNOLOGY)
Project Guide:
ER. Madhu Dhiman
Submitted By:
Manju (D850325) Monika (D850327) Neelam (D850331) Nirotma (D850334)
DEPARTMENT OF COMPUTER SCIENCE AND TECHNOLOGY GOVERNMENT POLYTECHNIC FOR WOMEN KANDAGHAT, Distt. SOLAN (H.P.) Department of Computer Engineering Jan-June (2011)
GOVERNMENT POLYTEHNIC FOR WOMEN KANDAGHAT, DISTT. SOLAN (H.P) Department of Computer Engineering
Candidate Declaration
We hereby declare the work which is being presented in the entitled project INTERNET BANKING major project of the diploma in Computer science and engineering and submitted to the department of Computer science and engineering. H.P. India is an authentic record of our own work carried out during a period from Jan 2011 to June 2011, under the supervision of Er. Madhu Dhiman (lecturer, CSE). We have not submitted then matter presented in this project for the award of any other degree of this or any other university. This is to certify that our statement made by the candidate is correct to the best of my knowledge. ER. Madhu Dhiman (Project guide) Manju Guleria Monika Chauhan Neelam Verma Nirotma Panwar
GOVERNMENT POLYTEHNIC FOR WOMEN KANDAGHAT, DISTT.SOLAN (H.P) Department of Computer Engineering
CERTIFICATE
This is certify that this project report titled INTERNET BANKING submitted by Manju , Monika , Neelam & Nirotma in the partial fulfillment of the requirement for the award of the Diploma in computer engineering is a bonofide record of the work done by them at the GPW campus, kandaghat from 17th Jan to 20 June, 2011 under our supervision.
(project guide)
Principal
ACKNOWLEDGEMENT
Making a project is a bear of an understanding, not only for developer but also for those around him. Great acknowledgement is extended to all the people who make this project possible with their enthusiastic support and encouragement. First and foremost, we should like to express our profound graduate and sincere acknowledgement to polytechnic (W), Kandaghat who has been a source of perpetual inspiration to us, gently guiding and paying our way towards a bright carrier, throughout our diploma. We are fortunate enough to have: Er. Madhu Dhiman project guide She was ever willing to giving support and encouragement. It was only through her care, support and help that we were able to overcome initial hiccups during our early days in the project work. The entire experience of our project at this institute has not only increased our knowledge and potential but also inculcated in us the desire to learn more and higher. We are grateful to Er. Vinita Arya principle of Govt. Polytechnic (W) Kandaghat for giving us opportunity to work in such a project. Thank for all your advice and help even if we dont say it enough, we appreciate it.
Government Polytechnic for Women Kandaghat Distt. Solan (H.P.) Department of Computer Engineering
INTRODUCTION TO ORGANIZATION
The Government polytechnic for Women Kandaghat is the only polytechnic in this state for women. This institute was established in the year 1984 by the government of H.P. The basic theme was to improve skill and to increase the po lytechnic are accredited by ALL INDIA COUNCIL OF TECHNICAL EDUCATION (AICTE) and PHARMACY COUNCIL OF INDIA (PCI). The courses of diploma in Computer Engineering and eltx.Engg.are also NBA accredited. Takniki shiksha Board Dharamshala conducts the annual an d semester examination and pre-admission test (PAT) to the polytechnic. This polytechnic has undergone a massive modernization and computerization. The latest computers and other equipments are installed under Broadband Aided Project. Presently the institute offers the following courses which are as follows: 1. Computer Engg. 2. Eltx. Engg. 3. Pharmacy
PREFACE
It has been a great experience work together here in our college under the guidance of brilliant minds and highly qualified people here in govt. polytechnic college for women, who have made enormous efforts to make all the jobs under taken here successfully always contributed significantly to the development and progress their minds. It has been due to their astounding efforts that we are today enjoying all sorts of luxuries that computer world has provided with us. During our working on this project we try our level best to keep things understandable.
INDEX
INTRODUCTION
INTRODUCTION
FEASIBILITY STUDY
FEASIBILITY STUDY
Feasibility study is a preliminary study undertaken to determine and document a projects viability. The term feasibility study is also used to refer to the resulting document. These results of this study are use to make a decision whether to
proceed with the project, or table it. If it indeed leads to a project being approved, it will-before the real work of the proposed project starts-be used to ascertain the likelihood of the projects success. It is an analysis of possible alternative solutions to a problem and a recommendation on the best alternatices.
EXPLANATION
1.1 NEED ANALYSIS 1.2 TECHNICAL FEASIBILITY STUDY 1.3 CULTURAL FEASIBILITY STUDY 1.4 LEGAL FEASIBILITY STUDY 1.5 MARKETING FEASIBILITY STUDY
EXPLANATION
Feasibility study could be used to test a proposal for new system, which could be used because: The current system may no longer carry its purpose Technological advancement have rendered the current system obsolete The business is expending, allowing it to cope with extra work load Customers are complaining about the speed & quality of the work the business provide A feasibility study should examine three main areas: Market issues Technical & organization requirements Financial overviews Within a feasibility study seven areas must be reviewed, including those of needs analysis, economics, technical, schedule, organizational, cultural & legal.
NEED ANALYSIS
A need analysis should be the first undertaking of a feasibility study as it clearly defines the project outline and the clients requirements. Once these question have been answered the person/s undertaking the feasibility study will have outline the projects need definitions.
The following questions need to be asked to define the project need definition: What is the end deliverable? What purpose will it serve? What are the environmental effects?? What are the quality requirements? What is the minimal quality requirements allowed? What sustainability can we expect? What carryover work can we expect? What are the penalty clauses?
Not necessarily last, but all projects must face legal scrutiny. When an organization has a legal council on staff or on retainer, such reviews are typically standards.
Software development projects typically include initiation, planning, design, development, testing, implementation and maintenance phases. However, the phases may be divided differently depending on the organization involved. For example, initial project activities might be designated as request, requirementsdefinition and planning phases or initiation, concept development in reviewing the output of each phase to ensure the system is being built o deliver the needed functionality. The System Development Life cycle As used in the Construction of the Server Appliance
SYSTEM DESIGN
Introduction
Every man made entity is first a concept in someones mind computerized system, like other product technologies are developed in response to the perceived needs. Before any development is undertaken, certain specification are made consulting, the end user. Managers of the relative department & experienced engineers who have been associated with the development of various applications based on the user requirement, the software to be developed is plan the first step in planning a software projects to be prepare users technology a concise statement of the problem to be solved the definition problem, statement include a description of present situation and goal to be achieved by the new system.
User Requirements
To analyze & study a system, it is most necessary to recognize the requirement of the user. The requirements of the user of the personal information system are: Application should be user friendly so that user can select alternatives from menu with minimum efforts. Help should be available to user to solve any problem that occurs at any time of insertion, deletion and updating. Documentation of the system knows how to start and continue using the system. To provide guidance to a trained user to expand and improve on the existing personal information system.
Data flow diagrams (Also called Data Flow Graphs) is commonly used during problem analysis. Data flow diagram (DFD) is quite general and is not limited to problem analysis for software requirement specification. They were in use long before the software engineering discipline begin and are very useful in understanding the system and can be effectively used during analysis. A DFD shows the flow of data through a system. It views a system as a function that transforms the inputs into desired output. Suggestions for constructing a data flow graph: Work your way consistently from the inputs to the outputs or vice versa. If you get stuck, reverse direction. Start with a high level data flow graph with few major transforms describing the entire transformation from the inputs to outputs and then refine each transform with more detailed transformations. Never try to show control logic. If you find yourself thinking in terms of loops and decisions, it is time to stop and start again. Label each arrow with proper data element. Inputs and outputs of each transform should be carefully identified. Make use of and+ operation and show sufficient detail in the data flow graph. Try drawing alternate data flow graphs setting on one. Once we have constructed a DFD and its associated data dictionary we have to somehow verify that they are correct. They can be no formal verification of a DFD is modeling is not formally specified anywhere against which verification can be done. Human processes and rules of thumb must be used for verification.
REQUIREMENTS
REQUIREMENTS
a) HARDWARE REQUIREMENTS:
Processor Memory Hard Disk Monitor CDROM Mouse Keyboard Pentium 128 MB 500 MB or higher Color Monitor CDROM Drive 52X Standard 2/3 button Standard Keyboard
b) SOFTWARE REQUIREMENTS:
1. Windows XP as operating system 2. Java language software
LANGUAGE SELECTION
LANGUAGE SELECTION
TESTING
TESTING
Debugging is not testing but is always occur as a consequence of testing. After the code is written, the program is generated and executed. The code is debugging using the built debugging facility.
Testing is a program consist of providing the programming with a set text inputs (or text case) and observation if the program as expected. If the program fails to behave as expected then the condition under which a failure occurs are noted for debugging and correction. It is preferable to discover any surprise before the organization implements they system and depends on it. Testing is done through the system development at various stages. It is always a good practice to text system at different levels a various intervals i.e. subsystem, program module as work progress and finally the system as a whole. If this is not done, then poorly tested system can fail after installation. During testing one should try and fine area in which the program can Each test case is design with the intent of finding errors in the way the system will process it. Through testing of program do not guarantee the reliability of system. It is done to ensure that the system runs errors free.
Testing requires that the developer discard preconceived notions of the correctness of the software just develop and overcome a conflict of interest that occurs when errors are uncovered.
TESTING OBJECTIVES
There are number of rules that can serve well as testing well as testing objectives: 1. Testing is a process of executing a program with intent of finding an error. 2. A good test case is one that has a high probability of finding an as yet undiscovered errors. 3. A successful test is one that uncover as yet undiscovered errors.
TESTING PRINCIPLES
Before applying methods to design effective test cases, a software engineers must understand the basic principle that guides software testing. There is a set of testing rules. All tests should be traceable to organize/customer requirements. Test should be planned long before testing begins. The 80% of all errors uncovered during will likely be traceable to 20 of all program modules. Testing should begin in the small and progress toward testing in the large. Exhaustive testing is not possible. To be done effective, an independent third party should conduct testing.
3. System Testing
Unit Testing
In this phase analyst test the program/modules making up a system. For this reason unit testing is called program or module testing. It gives stress on the modules independently of one another to find errors. This helps the tester in detecting errors in coding and logic that are contained within that module alone.
Integrating Testing
After all modules of a system have been unit tested, integration of modules starts. The full product takes shape only after all the modules have been integrated. It consists of number of steps. During the each step, some modules are added to previously system and the system is tested again.
System Testing
Once all the modules have been integrated and tested, system testing can start. The system testing is the last chance to detect and correct errors before the system is installed. The purpose of the system testing is to consider all the likely variation to which it will be subjected and push the system to its limits.
DATAFLOW DIAGRAMS
DFD SYMBOLS:
Process Representation
1 LEVEL DFD
OUTPUT FORMS
2.HOME LOANS
BANK INTERESTS
TO CHANGE PASSWORD
CODING
USER LOGIN
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;
public class UserLogin extends JApplet implements ActionListener { static int count=0; private Connection con; Statement stmt; ResultSet rs; JLabel lblLoginId, lblPassword; JTextField tbLoginId; JPasswordField tbPassword; JButton btnLogin;
try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }
gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2;
gbc.gridy=3; add(btnLogin,gbc); btnLogin.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(count<3){ try { stmt=con.createStatement(); String query="SELECT tblUsers.*, tblAccounts.* FROM tblUsers INNER JOIN tblAccounts ON tblUsers.loginid = tblAccounts.loginid WHERE tblUsers.loginid='"+tbLoginId.getText()+"' AND tblUsers.passwd='"+tbPassword.getText()+"'"; rs=stmt.executeQuery(query);
if(rs.next()) {
JOptionPane.showMessageDialog(null,"Welcome !"); fout=new FileWriter("c:\\windows\\temp\\Users.dat"); bwrite=new BufferedWriter(fout); bwrite.write(tbLoginId.getText()); bwrite.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"user-cpanel.html"), "_self"); } else
count++;
JOptionPane.showMessageDialog(null,"Sorry ! you are not a valid user ! you have only "+(3-count)+" attempts left!");
} } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } }else { JOptionPane.showMessageDialog(null,"Your account has been locked ! Contact your nearest My Bank barnch"); }
} }
USER CPANEL
import java.io.*; import java.applet.*; import java.awt.*; import java.net.*; import javax.swing.*;
public class UserCPanel extends JApplet { FileReader fstream; public void init() { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;
if((strLine = br.readLine()) == null) { JOptionPane.showMessageDialog(null,strLine); getAppletContext().showDocument(new URL(getCodeBase().toString() +"index.html"), "_self"); } br.close(); } catch (FileNotFoundException fex)
ACCOUNT BALANCE
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;
public class AccountBalance extends JApplet implements ActionListener { private Connection con; Statement stmt; ResultSet rs; JLabel lblAccountNo;
JComboBox cmbAccountNo;
JButton btnView;
FileReader fstream;
FileWriter fout;
cmbAccountNo=new JComboBox();
btnView=new JButton("View");
try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'";
rs=stmt.executeQuery(query);
rs=stmt.executeQuery(query);
dos.write("<tr><td><b>Name</td><td>"+rs.getString(3)+"</td></tr>");
dos.write("<tr><td><b>Currency</td><td>"+rs.getString(4)+"</td></tr>");
dos.write("<tr><td><b>Balance</td><td>"+rs.getString(5)+"</td></tr>"); dos.write("<tr><td><b>Hold Funds</td><td>"+rs.getString(6)+"</td></tr>"); dos.write("<tr><td><b>Uncleared Funds</td><td>"+rs.getString(7)+"</td></tr>"); dos.write("<tr><td><b>Overdraft Limit</td><td>"+rs.getString(8)+"</td></tr>"); dos.write("<tr><td><b>Amount to be swept in</td><td>"+rs.getString(9)+"</td></tr>"); dos.write("<tr><td><b>Available Balance</td><td>"+rs.getString(10)+"</td></tr>");
ACCOUNT STATEMENT
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;
public class AccountSummary extends JApplet { private Connection con; Statement stmt; ResultSet rs;
FileReader fstream;
FileWriter fout;
public AccountSummary() {
con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;
try { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"' and accounttype='Saving'";
rs=stmt.executeQuery(query);
fout=new FileWriter("c:\\wamp\\www\\mybank\\account_summary.html"); BufferedWriter dos=new BufferedWriter(fout); dos.write("<h3>Saving Accounts</h3><p>"); dos.write("<table border=1 width='100%'><tr align=center><th>Account No</th><th>Branch</th><th>Name</th><th>CCY</th><th>Available Balance</th></tr>"); while(rs.next()) {
dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.getString(10)+"</td></tr>");
dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.getString(10)+"</td></tr>");
{ JOptionPane.showMessageDialog(null,e.toString()); } } }
MINI STATEMENT
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.FileReader;
public class MiniStatement extends JApplet implements ActionListener { private Connection con; Statement stmt; ResultSet rs; JLabel lblAccountNo, lblFrom, lblTo, lblShowTrans;
ButtonGroup bgroup;
JButton btnView;
FileReader fstream;
FileWriter fout;
lblAccountNo=new JLabel("Account Number: "); lblFrom=new JLabel("From "); lblTo=new JLabel("To: "); lblShowTrans=new JLabel("Show Transactions: ");
cmbAccountNo=new JComboBox();
btnView=new JButton("View");
try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { setLayout(gb);
add(cmbAccountNo,gbc);
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);
gbc.anchor=GridBagConstraints.NORTHWEST;
add(cmbToYY,gbc); cmbToYY.setEnabled(false);
stmt=con.createStatement();
String query=""; if(rdoMiniStat.isSelected()) { query="select * from tblTransaction where accountno='"+cmbAccountNo.getSelectedItem()+"'"; } else if(rdoSelectPeriod.isSelected()) { if(cmbShowTrans.getSelectedItem()=="Withdrawl") { query="select * from tblTransaction where accountno='"+cmbAccountNo.getSelectedItem()+"' and dttransaction between #"+cmbFromMMM.getSelectedItem()+"/"+cmbFromDD.getSelectedItem()+"/"+cmbFromY Y.getSelectedItem()+"# and #"+cmbToMMM.getSelectedItem()+"/"+cmbToDD.getSelectedItem()+"/"+cmbToYY.getSel ectedItem()+"# and withdrawl > 0"; } else if(cmbShowTrans.getSelectedItem()=="Deposit") { query="select * from tblTransaction where accountno='"+cmbAccountNo.getSelectedItem()+"' and dttransaction between #"+cmbFromMMM.getSelectedItem()+"/"+cmbFromDD.getSelectedItem()+"/"+cmbFromY Y.getSelectedItem()+"# and #"+cmbToMMM.getSelectedItem()+"/"+cmbToDD.getSelectedItem()+"/"+cmbToYY.getSel ectedItem()+"# and deposit > 0"; } else { query="select * from tblTransaction where accountno='"+cmbAccountNo.getSelectedItem()+"' and dttransaction between
rs=stmt.executeQuery(query);
dos.write("<h3>Mini Statement of Account No:"+cmbAccountNo.getSelectedItem()+"</h3><p>"); dos.write("<table border=1 width='100%'><tr align=center><th>Date</th><th>Narration</th><th>Cheque/Ref. No</th><th>Value Date</th><th>Withdrawl</th><th>Closing Balance</th><th>Cr/Dr</th></tr>"); while(rs.next()) { float dposit=Float.valueOf(rs.getString(8)); float wdrwl=Float.valueOf(rs.getString(7));
dos.write("<tr><td>"+rs.getString(2)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.g etString(5)+"</td><td>"+rs.getString(6)+"</td><td>"+wdrwl+"</td><td>"+(dpositwdrwl)+"</td><td>Dr</td></tr>");
} dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"mini_statement_withdrawl.html"), "main_frame");
dos.write("<h3>Mini Statement of Account No:"+cmbAccountNo.getSelectedItem()+"</h3><p>"); dos.write("<table border=1 width='100%'><tr align=center><th>Date</th><th>Narration</th><th>Cheque/Ref. No</th><th>Value Date</th><th>Deposit</th><th>Closing Balance</th><th>Cr/Dr</th></tr>"); while(rs.next()) { float dposit=Float.valueOf(rs.getString(8)); float wdrwl=Float.valueOf(rs.getString(7));
dos.write("<tr><td>"+rs.getString(2)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.g etString(5)+"</td><td>"+rs.getString(6)+"</td><td>"+dposit+"</td><td>"+(dpositwdrwl)+"</td><td>Cr</td></tr>");
} dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"mini_statement_deposit.html"), "main_frame"); } else { fout=new FileWriter("c:\\wamp\\www\\mybank\\mini_statement.html"); BufferedWriter dos=new BufferedWriter(fout);
dos.write("<h3>Mini Statement of Account No:"+cmbAccountNo.getSelectedItem()+"</h3><p>"); dos.write("<table border=1 width='100%'><tr align=center><th>Date</th><th>Narration</th><th>Cheque/Ref. No</th><th>Value Date</th><th>Withdrawl</th><th>Deposit</th><th>Closing Balance</th><th>Cr/Dr</th></tr>"); while(rs.next()) { float dposit=Float.valueOf(rs.getString(8)); float wdrwl=Float.valueOf(rs.getString(7)); if(dposit==0)
dos.write("<tr><td>"+rs.getString(2)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.g etString(5)+"</td><td>"+rs.getString(6)+"</td><td>"+wdrwl+"</td><td>"+dposit+"</td><t d>"+(dposit-wdrwl)+"</td><td>Cr</td></tr>"); } dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close();
} catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } else if(evt.getSource()==rdoMiniStat) { cmbFromDD.setEnabled(false); cmbFromMMM.setEnabled(false); cmbFromYY.setEnabled(false); cmbToDD.setEnabled(false); cmbToMMM.setEnabled(false); cmbToYY.setEnabled(false); cmbShowTrans.setEnabled(false);
ADD BENIFICIARY
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;
public class AddBenificiary extends JApplet implements ActionListener { JLabel lblAccountNo, lblName,lblEmail; JTextField tbAccountNo,tbName,tbEmail;
JButton btnRegister;
FileReader fstream;
public AddBenificiary()
lblAccountNo=new JLabel("Benificiary Account No."); lblName=new JLabel("Benificiary Name/Nick Name"); lblEmail=new JLabel("Email ID");
btnRegister=new JButton("Add");
try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !");
gbc.anchor=GridBagConstraints.NORTHWEST;
gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=4; gbc.gridy=2; add(btnRegister,gbc); btnRegister.addActionListener(this); } public void actionPerformed(ActionEvent evt) { try { stmt=con.createStatement();
if((strLine = br.readLine()) != null) { String query="insert into tblTWB (benificiary_acno,benificiary_name,emailid, loginid) values('"+tbAccountNo.getText()+"','"+tbName.getText()+"','"+tbEmail.getText()+"','"+strLi ne+"')";
//JOptionPane.showMessageDialog(null,query);
stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Benificiary added successfully !"); tbAccountNo.setText(""); tbName.setText(""); tbEmail.setText(""); } else JOptionPane.showMessageDialog(null,"Login id not found"); } catch(Exception ex) { JOptionPane.showMessageDialog(null,"This benificiary already added or this account does not exist in our bank ! Please check again."); } } catch(Exception ex_1)
{ JOptionPane.showMessageDialog(null,ex_1.toString()); } } }
public class AddBenificiaryNEFT extends JApplet implements ActionListener { JLabel lblAccountNo, lblAcType, lblIFSC, lblName,lblEmail; JTextField tbAccountNo, tbIFSC, tbName,tbEmail;
FileReader fstream;
public AddBenificiaryNEFT() {
lblAccountNo=new JLabel("Benificiary Account No.: "); lblAcType=new JLabel("Account Type: "); lblIFSC=new JLabel("IFSC Code: "); lblName=new JLabel("Benificiary Name/Nick Name"); lblEmail=new JLabel("Email ID");
btnRegister=new JButton("Add");
catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { setLayout(gb);
gbc.anchor=GridBagConstraints.NORTHWEST;
gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=6; add(btnRegister,gbc); btnRegister.addActionListener(this); } public void actionPerformed(ActionEvent evt) { try { stmt=con.createStatement(); try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");
if((strLine = br.readLine()) != null) { String query="insert into tblTOB_NEFT (benificiary_acno, benificiary_actype, IFSC_code, benificiary_name,emailid, loginid) values('"+tbAccountNo.getText()+"','"+cmbAcType.getSelectedItem()+"','"+tbIFSC.getText( )+"','"+tbName.getText()+"','"+tbEmail.getText()+"','"+strLine+"')";
//JOptionPane.showMessageDialog(null,query);
stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Benificiary added successfully !"); tbAccountNo.setText(""); tbIFSC.setText(""); tbName.setText(""); tbEmail.setText(""); } else JOptionPane.showMessageDialog(null,"Login id not found"); } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } catch(Exception ex_1) {
JOptionPane.showMessageDialog(null,ex_1.toString()); } } }
public class AddBenificiaryRTGS extends JApplet implements ActionListener { JLabel lblAccountNo, lblIFSC, lblName,lblEmail; JTextField tbAccountNo, tbIFSC, tbName,tbEmail;
FileReader fstream;
public AddBenificiaryRTGS() {
lblAccountNo=new JLabel("Benificiary Account No.: "); lblIFSC=new JLabel("IFSC Code: "); lblName=new JLabel("Benificiary Name/Nick Name"); lblEmail=new JLabel("Email ID");
btnRegister=new JButton("Add");
try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }
catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { setLayout(gb);
gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2;
gbc.gridy=3; add(tbIFSC,gbc);
btnRegister.addActionListener(this); } public void actionPerformed(ActionEvent evt) { try { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="insert into tblTOB_RTGS (benificiary_acno, IFSC_code, benificiary_name,emailid,loginid) values('"+tbAccountNo.getText()+"','"+tbIFSC.getText()+"','"+tbName.getText()+"','"+tbEm ail.getText()+"','"+strLine+"')";
//JOptionPane.showMessageDialog(null,query);
stmt.executeUpdate(query);
tbName.setText(""); tbEmail.setText("");
} else JOptionPane.showMessageDialog(null,"Login id not found"); } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } catch(Exception ex_1) { JOptionPane.showMessageDialog(null,ex_1.toString()); } } }
JButton btnTransfer;
FileReader fstream;
FileWriter fout;
lblFromAccountNo=new JLabel("From Account Number: "); lblToAccountNo=new JLabel("To Account Number"); lblTransDesc=new JLabel("Transfer Description "); lblTransAmount=new JLabel("Transfer Amount");
btnTransfer=new JButton("Transfer");
con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);
gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1;
gbc.gridy=2; add(lblToAccountNo,gbc);
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTWB where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);
while(rs.next()) { cmbToAccountNo.addItem(rs.getString(1)); } }
btnTransfer.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnTransfer) { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");
while(rs_1.next()) {
if(Float.valueOf(rs_1.getString(10))>Float.valueOf(txtTransAmount.getText())) {
int chkrefno=(int)(Math.random()*1000); String query="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,deposit, loginid,fromacno) values('"+s+"','"+cmbToAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+ch krefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbFromAccountNo.getSelectedIt em()+"')";
//JOptionPane.showMessageDialog(null,query);
stmt.executeUpdate(query);
//JOptionPane.showMessageDialog(null,query_2);
stmt.executeUpdate(query_2);
chkrefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbToAccountNo.getSelectedIt em()+"')";
//JOptionPane.showMessageDialog(null,query_1);
stmt.executeUpdate(query_1);
//JOptionPane.showMessageDialog(null,query_3);
stmt.executeUpdate(query_3);
} }
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter; import java.util.Date.*; import java.text.*; public class TransNEFTBank extends JApplet implements ActionListener { private Connection con; Statement stmt,stmt_1; ResultSet rs,rs_1; JLabel lblFromAccountNo, lblToAccountNo, lblTransDesc, lblTransAmount;
JButton btnTransfer;
FileReader fstream;
FileWriter fout;
lblFromAccountNo=new JLabel("From Account Number: "); lblToAccountNo=new JLabel("To Account Number"); lblTransDesc=new JLabel("Transfer Description "); lblTransAmount=new JLabel("Transfer Amount");
btnTransfer=new JButton("Transfer");
} catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }
try
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);
add(lblToAccountNo,gbc);
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTOB_NEFT where loginid='"+strLine+"' and verification=1"; rs=stmt.executeQuery(query);
btnTransfer.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnTransfer) { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");
stmt_1=con.createStatement();
while(rs_1.next()) {
if(Float.valueOf(rs_1.getString(10))>Float.valueOf(txtTransAmount.getText())) {
int chkrefno=(int)(Math.random()*1000); String query="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,deposit, loginid,fromacno) values('"+s+"','"+cmbToAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+ch krefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbFromAccountNo.getSelectedIt em()+"')";
//JOptionPane.showMessageDialog(null,query);
stmt.executeUpdate(query);
//JOptionPane.showMessageDialog(null,query_2);
stmt.executeUpdate(query_2);
//JOptionPane.showMessageDialog(null,query_1);
stmt.executeUpdate(query_1);
//JOptionPane.showMessageDialog(null,query_3);
stmt.executeUpdate(query_3);
JButton btnTransfer;
FileReader fstream;
FileWriter fout;
lblFromAccountNo=new JLabel("From Account Number: "); lblToAccountNo=new JLabel("To Account Number"); lblTransDesc=new JLabel("Transfer Description "); lblTransAmount=new JLabel("Transfer Amount");
btnTransfer=new JButton("Transfer");
con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);
gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1;
gbc.gridy=2; add(lblToAccountNo,gbc);
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTOB_RTGS where loginid='"+strLine+"' and verification=1"; rs=stmt.executeQuery(query);
while(rs.next()) { cmbToAccountNo.addItem(rs.getString(1)); }
if(cmbToAccountNo.getItemCount()==0) JOptionPane.showMessageDialog(null,"No RTGS benificiary verified yet !"); } } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }
gbc.anchor=GridBagConstraints.NORTHWEST;
btnTransfer.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnTransfer) { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");
while(rs_1.next()) {
if(Float.valueOf(rs_1.getString(10))>Float.valueOf(txtTransAmount.getText())) {
int chkrefno=(int)(Math.random()*1000); String query="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,deposit, loginid,fromacno) values('"+s+"','"+cmbToAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+ch krefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbFromAccountNo.getSelectedIt em()+"')";
//JOptionPane.showMessageDialog(null,query);
stmt.executeUpdate(query);
//JOptionPane.showMessageDialog(null,query_2);
stmt.executeUpdate(query_2);
//JOptionPane.showMessageDialog(null,query_1);
stmt.executeUpdate(query_1);
//JOptionPane.showMessageDialog(null,query_3);
stmt.executeUpdate(query_3);
public class ViewBenificiary extends JApplet { private Connection con; Statement stmt; ResultSet rs;
FileReader fstream;
FileWriter fout;
public ViewBenificiary() {
con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() {
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTWB where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);
dos.write("<h3>Your Benificiary within BANK:</h3><p>"); dos.write("<table border=1 width='100%' cellpadding='3'>"); dos.write("<tr><td><b>Benificiary Account Number</td><td><b>Benificiary Name</td><td><b>Email</td></tr>"); while(rs.next()) {
dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td></tr>"); } dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"transfer_view_benificiary.html"), "main_frame");
public class ViewBenificiaryNEFT extends JApplet { private Connection con; Statement stmt; ResultSet rs;
FileReader fstream;
FileWriter fout;
public ViewBenificiaryNEFT() {
con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() {
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTOB_NEFT where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);
dos.write("<h3>Your Benificiary NEFT Accounts:</h3><p>"); dos.write("<table border=1 width='100%' cellpadding='3'>"); dos.write("<tr><td><b>Benificiary Account Number</td><td><b>Benificiary Account Type</td><td><b>IFSC Code</td><td><b>Benificiary Name</td><td><b>Email</td></tr>"); while(rs.next()) {
dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.getString(5)+"</td></tr>"); } dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"transfer_view_benificiaryNEFT.html"), "main_frame");
public class ViewBenificiaryRTGS extends JApplet { private Connection con; Statement stmt; ResultSet rs;
FileReader fstream;
FileWriter fout;
public ViewBenificiaryRTGS() {
con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() {
if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTOB_RTGS where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);
dos.write("<h3>Your Benificiary RTGS Accounts:</h3><p>"); dos.write("<table border=1 width='100%' cellpadding='3'>"); dos.write("<tr><td><b>Benificiary Account Number</td><td><b>IFSC Code</td><td><b>Benificiary Name</td><td><b>Email</td></tr>"); while(rs.next()) {
dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td><td>"+rs.getString(4)+"</td></tr>"); } dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"transfer_view_benificiaryRTGS.html"), "main_frame");
CHANGE PASSWORD
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedReader; import java.io.FileReader;
public class ChangePassword extends JApplet implements ActionListener { private Connection con; Statement stmt; ResultSet rs; JLabel lblLoginId, lblPassword; JPasswordField tbPassword,tbLoginId; JButton btnLogin;
FileReader fstream;
public ChangePassword() {
btnLogin=new JButton("Change");
try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() {
setLayout(gb);
} public void actionPerformed(ActionEvent evt) { String pass=tbPassword.getText(); if(pass.length()>=5) { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine; String passwd=tbLoginId.getText(); if((strLine = br.readLine()) != null && passwd.equals(tbPassword.getText())) { stmt=con.createStatement(); String query="update tblUsers set passwd='"+tbPassword.getText()+"' where loginid='"+strLine+"'";
stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Password not matched ! Try again"); br.close(); } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }}else JOptionPane.showMessageDialog(null,"Password cannot be empty or less than 5 !"); } }
LOGOUT
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;
public void init() { try { JOptionPane.showMessageDialog(null,"The user Logged out successfully !"); fout=new FileWriter("c:\\windows\\temp\\Users.dat"); bwrite=new BufferedWriter(fout); bwrite.write(""); bwrite.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"index.html"), "_self");
USER REGISTRATION
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*;
public class UserRegistration extends JApplet implements ActionListener { JLabel lblAccountNo, lblName,lblContact,lblEmail, lblBranch; JTextField tbAccountNo,tbName,tbContact,tbEmail; JComboBox cmbBranch; JButton btnRegister;
public UserRegistration() {
lblAccountNo=new JLabel("Account No.: "); lblName=new JLabel("Name: "); lblContact=new JLabel("Contact No.: "); lblEmail=new JLabel("Email ID: "); lblBranch=new JLabel("Branch: ");
try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) {
gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2;
gbc.gridy=5; add(cmbBranch,gbc);
gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=6; add(btnRegister,gbc); btnRegister.addActionListener(this); } public void actionPerformed(ActionEvent evt) { try { stmt=con.createStatement(); String query="insert into tblRequest (accountno,name,contact,email,branch) values('"+tbAccountNo.getText()+"','"+tbName.getText()+"','"+tbContact.getText()+"','"+tbE mail.getText()+"','"+cmbBranch.getSelectedItem()+"')";
JOptionPane.showMessageDialog(null,query);
stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Request sent successfully !"); getAppletContext().showDocument(new URL(getCodeBase().toString() +"index.html"), "_self"); } catch(Exception ex)
{ JOptionPane.showMessageDialog(null,"Sorry ! Request might already made Or this Account does not exists !"); } } }
BENEFITS OF PROJECT
FUTURE SCOPE
BIBLOGRAPHY
BIBLOGRAPHY
Google.com Wikipedia.com Java