0% found this document useful (0 votes)
23 views

atm docs

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

atm docs

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 105

A

PROJECT REPORT
ON

ATM MANAGEMENT SYSTEM

Submitted in Partial Fulfillment of the Requirements


for the award of the degree of

BACHELOR OF COMPUTER APPLICATION


(BCA)

Submitted by: Under the Guidance :

Amjad (Roll No. 210855106039) Mrs.Neetu Singh

Moh Farman (Roll No. 210855106183) (Assistant Professor BCA Dept., SRC)

SHRI RAM COLLEGE, MUZAFFARNAGAR


AFFILIATED TO MAA SHAKUMBHARI UNIVERSITY, SAHARANPUR, U.P.
SESSION 2021 - 2024

1
Date: ……………..

FORWARDING LETTER

This is to certify that the project entitled “ATM MANAGEMENT SYSTEM” has been submitted
for the partial fulfillment for the award of Degree of Bachelor of Computer Applications from
Maa Shakumbhari University, Saharanpur i s a n a u t h e n t i c w o r k c a r r i e d out by Mr.
Amjad (University Roll No.210855106039) and Mr.Moh Farman (210855106183) under the
guidance of Project Guide Mrs.Neetu Singh ..

We wish him/her all the very best for the future endeavors.

Internal Guide Head - BCA Department

Mrs. Neetu Singh Mr. Nishant Rathi

2
ACKNOWLEDGEMENT

This project report on “ATM Management System” is the result of idea and suggestions to me
by Mr. Nishant Rathi (HOD) and Mrs.Neetu Singh

We have received unfailing encouragement and inspiration of Mrs.Neetu Singh whose


exceptional knowledge and unparalleled behavior is full of ardent inspiration in it. However, we
can never adequate thank all those who have their assistance, guidance, cooperation criticism
contributed to the improvement of this report. We are ebullient in expressing my intense in debtless
heartiest gratitude to all of them.

Since performance feedback is essential for effective communication, mistakes and creative
feedback of the report may be unhesitatingly communicated to me, who will be as far as possible
duly acknowledged and most welcome.

In this report, whatever is beneficial comes from almighty, and whatever is faulty is mine.

Student Signature
Amjad(Roll No. 210855106039)

Moh Farman(Roll No. 210855106183)

3
DECLARATION

We Amjad,Moh Farman hereby declares that the project report title “ATM Management System” is an
original work carried out by us under the supervision of Mrs.Neetu Singh Further declare that this work
has not been submitted to any other Institute/University for the award of the degree of Bachelor of
Technology

Student
Amjad (210855106039)

Moh Farman(210855106183)

4
PREFACE

This project has been written in simple language. In presenting this project matter, we have tried our best
to make this exposition very clear and concise. Every attempt has been made to create the interest of the
converted people in project. Although the presentation has made in the honest manner and the entire
human weakness and they are if the constructive suggestion modification and error brought to our notice
will be highly appreciated and grateful acknowledged.

This document is a full information document that serves for SRS document also. This project contains all
basic facilities that can be provide by a technical institute management system.

We had kept the focus, while developing the project, that it should be project that be implemented in any
technical college with only slight modifications. Because it is an introductory project so it does not contain
all facilities that provided by a university.

5
CONTENTS

Contents

Cover Page

Concerned Letter

Forwarding Letter

Acknowelegement

Declaration

Preface

INDEX

Ch.1.Introduction………………………...…………………………………………...7

1.1 Scope of The System…....................................................................................8

1.2 Project Description…………………………………………………………...9


1.2.1. About
existing…………………………………………………….…….10
1.2.2. Implementation of project
………………………………………….………………...11
1.3. Advantages of
Project………………………………...........................................................12

Ch.2.Project category Tools &Environment

2.1 Project Category…………………………………………………….……....13

2.2 Front end Coverage………………………………………………….……...14

2.3 Back end Coverage………………………………………………….….…...15

2.4 Software and Hardware Requirements…………………………….….…….16

Ch.3.Project Development stages

6
3.1. Recognition of needs…………………………………………..…………...18

3.2 Feasibility Study…………………………………………….….…………..19

3.3. System Analysis (DFD’s E-R Diagram)……………...................................22

3.4. System Development……………………………………….….….………..26

3.5. Testing, Implementation & maintenance………………….………..….…....27

Ch.4.Project form

4.1. Database Design………………….………………………………………….27

4.2.Forms………………………………………………………………………...30

4.3. Coding……………………………………………………..………..…….……...….43

Ch.5.Conclusion ..………………………………………………………….………………..100

Ch.6.Future Enhancement ..……………………………………………..............................101

Bibliography…………………………………………………………………….....................102

7
INTRODUCTION

ATM Management System is a tool that It provides efficient services to its Account and Customer. The
various types of operations and dealings take places in the Bank. But we had undertaken the work of
Computerization of Generation of Account Management System which covers the activities related to
Account and Customer etc. & All Types of activities corresponds to the Member, these operations was
manually operated by the clerks and Operator and the operations were really time consuming task to
perform. The present system will help them a lot.

MAIN OBJECTIVE OF THIS PROJECT:

1. To provide security as only an authorized employee can interact with the system.
2. To help the customer working easily and efficiently.
3. To help the customer in reducing errors that are encountered frequently during manual operations
by concurrently updating the data stored in many places.
4. To reduce the workload on the staff by providing automatic calculation.
5. To help the customer or manager in tracing the transaction quickly.
6. To help the customer in generating various reports at various nick of time as per their requirements
e.g. daily, weekly, monthly or annually.
7. To reduce the manpower.
8. To maintain the data with complete consistency and minimum redundancy.

8
1.1 SCOPE OF THE SYSTEM

The scope of this document includes an overview of the ATM MANAGEMENT


SYSTEM project, detailed information about the requirements, including functional
requirements, interface requirements, non-functional requirements and additional
constraints of the system.
1. There are three basic users – customer, employee, Admin.
2. All users have their own profile in this project.
3. Customer can search for open new account. They also can take loan from the bank
4. Bank can give loan and can view account’s record.
5. Admin views and manages the customer and employee.

9
1.2 PROJECT DESCRIPTION

Today computer has become the backbone of nearly every occupation. In every industry or
company or any institution, the several employees have to maintain a number of records in various
part of the organization. In a market, there is a need to maintain record about employees, edibles,
assets & many more.

To do this work manually requires a lot of manpower and consumes too much time. Moreover one is never
sure about the efficiency & accuracy of work being done and records being maintained. A bad part of this
style of working is that, if a person concerned for a particular job, say maintaining supplier record, is on
leave, some of the process gets standstill, which depends on the records kept by that employee. That is,
where automation comes in to help and allows simple, smooth and most efficient, secure and easy to handle
functionality.

This system will reduce the workload of the employee and time of processing of data from one unit to
another. It also will help the staff/manager in tracing the daily transaction & maintain staff record, asset
information to reduce the manpower. It also provides the facility to prevent the unauthorized data access of
other persons by categorized the user as normal user and administrator. Only administrator can delete &
even modify the records.

This system will prove to be master key to manage of a bank. Now days all the organizations are converting
from manual to computerized transactions. This provides better services to the employees with less effort
thus increasing the demand of this type of system day by day.

This has brought about marvelous changes in the life of human being and has made our life easy &
comfortable. It has revolutionized the whole era.

This project ATM MANAGEMENT SYSTEM” will help the customer & stands at their account in
every sphere of their activities regarding a taking loan. It will be always their back & call.

10
1.2.1ABOUT EXISTING SYSTEM

In the general account of the customers, there are many of problems are faced . Some of these problems
can be managed easily, but some of them have many challenging work when employee can faced that.

Some of these challenges in the general bank can be figure-out as:-

 Difficulty with the record keeping.


 Managing of all records.
 Difficulty to creation of many other recording files for records.
 All record can’t be placed in single way nature.

All of these type’s challenges can be easily generate in a general and manually operated costumer record..

11
1.2.2 IMPLEMENTATION OF PROJECT

A crucial phase in the system life cycle is the successful implementation of the new system design.
Implementation includes all those activities that take place to convert from the old system to tee
new one. The new system may be completely new, replacing an existing system. In either case,
proper implementation becomes necessary so that a reliable system based on the requirements of
the organization can be provided. Successful implementation may not guarantee improvement in
the organization using the new system , but improper installation will prevent it. It has been
observed that even the best system can’t show good result if the analysts managing the
implementation do not attend to every important details. This is an area where the systems
analysts need to work with utmost care. This system will be implemented using java netbeans as
front end and MS-Access as back end windows 98 a the platform.

For the successful implementation of a system, the training of the users of the system plays an
important role. Because even well designed system can succeed or fail because of the way they are
operated and used. Therefore, the quality of the training received by the personnel involved with
the system in various capacities helps or hinders and may even prevent the successful
implementation of management information system. Those who are directly or indirectly related
with the system development work must know in detail what their roles will be , how they can ace
efficient use of the system and what the system will or will not do for them. Therefore both system
operators and users need training.

12
1.3 ADVANTAGE OF PROJECT

SPEED:

They understand the importance of timing, of getting there before the competition. A rich portfolio of
reusable, modular frameworks helps jump-start projects. Tried and tested methodology ensures that we
follow a predictable, low - risk path to achieve results. Our track record is testimony to complex projects
delivered within and evens before schedule.

EXPERTISE:

Our teams combine cutting edge technology skills with rich domain expertise. What’s equally important -
they share a strong customer orientation that means they actually start by listening to the customer. They’re
focused on coming up with solutions that serve customer requirements today and anticipate future needs.

A FULL SERVICE PORTFOLIO:

They offer customers the advantage of being able to Architect, integrate and manage technology services.
This means that they can rely on one, fully accountable source instead of trying to integrate disparate multi
vendor solutions.

SERVICES:

It Asset Manager is providing it’s services to companies which are in the field of production, quality control
etc With their rich expertise and experience and information technology they are in best position to provide
software solutions to distinct business requirements.

13
Ch 2 PROJECT CATEGORY & ENVIRONEMENT

2.1 Project Category & Development

Today computer has become the backbone of nearly every occupation. In every industry or company or any
institution, the several employees have to maintain a number of records in various part of the organization.
In a market, there is a need to maintain record about employees, edibles, assets & many more.

To do this work manually requires a lot of manpower and consumes too much time. Moreover one is never
sure about the efficiency & accuracy of work being done and records being maintained. A bad part of this
style of working is that, if a person concerned for a particular job, say maintaining customer record, is on
leave, some of the process gets standstill, which depends on the records kept by that employee. That is,
where automation comes in to help and allows simple, smooth and most efficient, secure and easy to handle
functionality.

This system will reduce the workload of the employee and time of processing of data from one unit to
another.It also provides the facility to prevent the unauthorized data access of other persons by categorized
the user as normal user and administrator. Only administrator can delete & even modify the records.

14
2.2 Front end Coverage

FRONT END

JAVA used as FRONT END

Java uses front end programming because JAVA(version jdk 7.1) use back end as like
ACCESS DATABASE(2007)

15
2.3 Back end Coverage

BACK END

Back end

Microsoft Access-2007

16
2.4 Software and Hardware Requirements

Hardware Requirements:

Processor : Pentium 4 or above


Memory : 512MB RAM or above
Hard disk : 20MB
Keyboard : 104 keys
Microsoft Access : 2007

Software Requirements:

Operating System : Windows XP/2003 or Linux/Solaris


Programming Language : Java(version JDK 7.1)
Database Applications : JDBC
Database : MS-Access
Netbeans : 7.4

17
18
3.1 ROCOGNITION OF NEEDS

We all know the importance of computerization. The world is moving ahead at lightning speed and
everyone is running short of time. One always wants to get the information and perform a task he/she/they
desire(s) within a short period of time and too with amount of efficiency and accuracy. The application
areas for the computerization have been selected on the basis of following factors:

1 Minimizing the manual records kept at different locations.


2 There will be more data integrity.
3 Facilitating desired information display, very quickly, by retrieving information from users.
4 Facilitating various statistical information which helps in decision-making?
5 To reduce manual efforts in activities that involved repetitive work.
6 Updating and deletion of such a huge amount of data will become easier.

19
3.2 FEASIBILITY STUDY

SYSTEM ANALYSIS

Systems analysis refers to the process of examining a business situation with the intent of
improving it through better procedure and methods. Systems development can generally be
thought of as having two major components Systems Analysis and Systems Design.

Systems analysis is the process of gathering and interpreting facts, diagnosis problems and using
the information to recommend improvement to the system. In brief, we can say that analysis
specifies what the system should do.

System analysis is conducted with the following objectives in mind:

1. Identify the Student and Staff members need

2. Evaluate the system concept for feasibility

3. Perform economic and technical analysis

4. Allocate function to hardware, software, people, database and other system elements

5. Establish cost and schedule constraints

6. Create a system definition that forms the foundation for all subsequent engineering

FEASIBILITY STUDY

20
The concept of feasibility is to determine whether or not a project is worth doing.

The process followed in making this determination is called feasibility study.

Once it has been determined that a project is feasible, the system analyst can go ahead and prepare
the project specification which finalizes project requirements.

Types of feasibility

1. Technical Feasibility
2. Operational Feasibility
3. Economic Feasibility
4. Social feasibility
5. Management Feasibility
6. Legal Feasibility
7. Time Feasibility

Here we describe only few of these in detail:-

TECHNICAL FEASIBILITY

This is concerned with specifying equipment and software that will successfully satisfy the
user requirement. Technical needs of the system include:-

 Facility to produce output in a given time


 Response time under certain conditions
 Ability to process a certain volume of transactions at a particular period
 Facility to communicate data to distant location

21
In examining technical feasibility, configuration of the system is given more importance than the actual
make of hardware .Configuration should give the complete picture about the system’s requirements: how
many workstations are required , how these units are interconnected so that they could operate and
communicate smoothly. What speeds of input and output should be achieved at particular quality of
printing.

The computers are easily available in almost all the places, even in villages. The hardware needed to carry
out this project with 64 MB of RAM and 2 GB HDD.

The software needed to carry out this project include Visual Basic 6.0 as front end and oracle 8 as back end
.So the technology required to carry out the project is easily available and affordable, hence this project is
technically feasible.

Due to all these reasons implementation of such system becomes not only feasible but reputed to the
organization..

OPERATIONAL FEASIBILITY

This is mainly related to human organization and political aspects. The points to be considered
are:-

 What changes will be brought with the system?


 What organizational structures are disturbed?
 What new skills will be required? Do the existing staff members have these skills?
If not, they be trained in due course of time.

This feasibility study is carried out by a small group of people who are familiar with the
information system techniques who understand the parts of business that are relevant to the project
and are skilled in the system analysis and design process. This project is not developed just for

22
fun. They are developed on demand of the organization for which the system is being developed.
Therefore the chances of resistance from the company Staff is almost nil. Any disturbance to the
organization if occurs will be advantageous to the organization. Also the time required to carry out
a transaction will be required to a large extent, which will make the students and others happy and
cheerful. The operators now will be able to service more students and staff members than before
in same time period. There is no need to recruit new staff to corporate the system .The existing
staff of the company can be trained to interact with the system, which is a GUI, based software
and is easy to use. Hence the project is Operationally feasible.

ECONOMIC FEASIBILITY

Economic analysis is the most frequently used technique for evaluating the effectiveness of a proposed
system. More commonly known as cost-benefit analysis; the procedure is to determine the benefits and
savings that are expected from a proposed system and compare them with costs. If benefits outweigh costs,
a decision is taken to design and implement the system.

Cost-Benefit Analysis

Since cost plays an important role in deciding the new system, it must be identified

and estimated properly. Benefits are also of different types and can be grouped on the basis of advantages
they provide to the management.

Cost-saving benefit leads to reduction in administrative and operational costs.

Cost-avoidance benefit eliminate future administrative and operational costs.

Improved-service-level benefits are those where the performance of the system is improved by a new
computer based method e.g. servicing a student in two minutes rather than five to ten minutes is an example

23
of this type of benefit. Improved-information benefits is where computer based methods lead to better
information for decision-making.

Direct Or Indirect Costs And Benefits

Direct costs are those which are directly associated with a system. They are applied directly to the operator.

Direct benefits also can be specifically attributable to a given project.

Indirect costs not directly associated with a specific activity in the system. They are often referred to as
overhead expenses.

For example cost of space to install a system, maintenance of computer centre.

Heat ,light and air-conditioning are all tangible costs but their proportion is difficult to calculate to a specify
activity like report.

Indirect benefits are realized as by –products of another system.

We can define cost-benefit analysis as:-

1. That method by which we can estimate the value of the gross benefits of a new system specification.
2. That method by which we find and determine the increased operating costs associated with the
gross benefits.
3. The subtraction of these operating costs from the associated gross benefits to arrive at net benefits.
4. That method by which we find and estimate the monetary value of the development costs that
produce the benefits.

5. Those methods by which we show the time –relationship between net benefits and development
costs as they relate to cash flow ,payback on investment, and time-in process taking into operation factors
such as inflation etc.

COST ESTIMATON OF THE PROJECT

24
The primary reason for cost and schedule estimation is to enable the client or developer to perform a cost-
benefit analysis and for project monitoring and control . Cost and schedule estimates are also required to
determine the staffing level for a project during different phases.

Cost in a project is due to the requirements for software hardware and human resource. Hardware resources
are such things as the computer time, terminal time and memory required for the project. whereas software
resources include the tools and the compilers needed during development. The bulk of the cost of software
development is due to the human resources needed , and most cost estimation procedures focus on this
aspect. Most of the estimates are determined in terms of person-months(PM)

25
3.3 DATA FLOW DIAGRAM

0 Level DFD

CUSTOMER HEAD

ATM

MANAGEMENT
EMPLOYEE MANAGER
SYSTEM

ACCOUNT CASHIER

26
LOGIN MANAGEMENT CHECK USER LOGIN

CUSTOMER MANAGEMENT GENERATE CUSTOMER


REPORT
t
EMPLOYEE MANAGEMENT
ATM EMPLOYEE REPORT

MANAGEMENT
ACCOUNT APPOINTMENT ACCOUNT APPOINTMENT
SYSTEM

CHECK AVAILBLITY
AVAILABILITYREPORT

SYSTEM USER
GENERATE SYSTEM
MANAGEMENT
REPORT
t

FIRST LEVEL DFD –ATM MANAGEMENT SYSTEM

27
CHECK

LOGIN TO MANAGE USER LOGIN


ROLL OF

MANAGE CUSTOMER
REPORT

ATM MANAGE EMPLOYEE


REPORT
MANAGEMENT
CHECK
MANAG ACCOUNT
SYSTEM
APPOINTMENT REPORT

MANAGE AVAILABILITY

MANAGE SYSTEM REPORT

MANAGEM ROLL OF USER MANAGE USER PERMISSION

SECOND LEVEL DFD –ATM MANAGEMENT SYSTEM

28
ENTITY – RELATIONSHIP DIAGRAM

Accno
Age Phon
Order
Address e
no.
Date Name
Email
ACCOUNT

USER
Type check

Date

contains
Cid
has

ATM Management

System

Has

DEPOST/WITHDRAW QUICK ACCESS

10000

5000
Acc No. 29

ACCNO. AMOUNT DATE 1000


200
500
3.4. SYSTEM DEVELOPMENT

Software development is a complex process so we divide the process in a small module. These
modules are called system development phases. These phases are combined known as system
development life cycle. These linear cycle phases are given below: -

i. Recognition of Needs: - It includes preliminary survey and initial investigation by personnel


interviews and questionnaires.

ii. System Analysis: - Detailed evaluation of present system and data collection is done. The various
reports and documents used are studied in detail. After that the interview of various levels of
management is carried out. The DFD. Data dictionary, Menu chart are the tools used for it.

iii. System Design: - It involves general and detailed design specification, output, input files, files,
program construction plans, all these details are submitted to user and got signed.

iv. System Construction: - It involves implementation of total construction plan i.e. coding. It is done
in a language i.e. known to user, analyst and programmer.

v. Testing: - Each and every input and output program is executed separately and tested for bugs.
Whole of the system is executed and test data is prepared and is fed in to the system and the output
reports are compared with the parameters.

vi. Implementation: -It checks that users requirement are fulfilled or not. Response time
is checked and finally the user manual is prepared and is submitted.

30
DATABSE DESIGN
Login table

New User table

Account table

31
Transaction table

32
FORMS

33
Admin login

34
Admin home

35
Welcome form

36
Login form

37
Home

38
Quick cash

39
Mini statement

40
Deposit form

41
Withdraw form

42
Balance enquiry

43
Change pin

44
Add User

45
CODING

46
Admin login form

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

private void loginActionPerformed(java.awt.event.ActionEvent evt) {

String pass;

pass=txtpin.getText();

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:atm");

Statement stmt= con.createStatement();

String query="select*from admin where pin='"+pass+"'";

ResultSet res= stmt.executeQuery(query);

if(res.next())

Admin_home obj=new Admin_home();

obj.show();

else

47
JOptionPane.showMessageDialog(null,"Incorrect PIN");

catch (Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

this.hide();

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new Admin_login().setVisible(true);

});

48
Add User

package atm_project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

private void submitActionPerformed(java.awt.event.ActionEvent evt) {

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:atm");

Statement state=con.createStatement();

String q="insert into users


values('"+txtname.getText()+"','"+txtcardno.getText()+"','"+txtpin.getText()+"',"+txtbalance.getT
ext()+")";

state.executeUpdate(q);

JOptionPane.showMessageDialog(null,"Successfully saved");

txtcardno.setText("");

txtname.setText("");

txtpin.setText("");

txtbalance.setText("");

txtname.requestFocus();

49
catch(Exception e)

JOptionPane.showMessageDialog(null,e.getMessage());

private void formWindowActivated(java.awt.event.WindowEvent evt) {

int n=1234;

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:atm");

Statement state=con.createStatement();

String q="select * from users";

ResultSet res=state.executeQuery(q);

while(res.next())

n=Integer.parseInt((res.getString("pin")));

txtpin.setText(""+(n+1));

txtname.requestFocus();

txtpin.setEnabled(false);

50
}

catch(Exception e)

JOptionPane.showMessageDialog(exit, e.getMessage());

private void exitActionPerformed(java.awt.event.ActionEvent evt) {

this.hide();

51
Balance enquiry

package atm_project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

private void depositActionPerformed(java.awt.event.ActionEvent evt) {

this.hide();

private void formWindowActivated(java.awt.event.WindowEvent evt) {

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection c=DriverManager.getConnection("jdbc:odbc:atm");

Statement state=c.createStatement();

String query;

query="select * from users where pin='"+p+"'";

ResultSet res=state.executeQuery(query);

int n=0;

52
while(res.next())

n=Integer.parseInt(res.getString("balance"));

balance=n;

lbl.setText("Your balance is : "+balance);

catch(Exception e)

JOptionPane.showMessageDialog(this, e.getMessage());

53
Change pin

package atm_project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.Statement;

import javax.swing.JOptionPane;

private void changeActionPerformed(java.awt.event.ActionEvent evt) {

String npas,cpas;

npas=txtnpin.getText();

cpas=txtrpin.getText();

if(npas.equals(cpas))

//connectivity

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con.createStatement();

String query="update users set pin='"+npas+"' where pin='"+p+"'";

stmt.executeUpdate(query);

JOptionPane.showMessageDialog(null,"Change succesfully");

54
txtnpin.setText("");

txtrpin.setText("");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

else

JOptionPane.showMessageDialog(null,"Password does not match");

private void backActionPerformed(java.awt.event.ActionEvent evt) {

this.hide();

55
Deposit form

private void changeActionPerformed(java.awt.event.ActionEvent evt) {

String npas,cpas;

npas=txtnpin.getText();

cpas=txtrpin.getText();

if(npas.equals(cpas))

//connectivity

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con.createStatement();

String query="update users set pin='"+npas+"' where pin='"+p+"'";

stmt.executeUpdate(query);

JOptionPane.showMessageDialog(null,"Change succesfully");

txtnpin.setText("");

txtrpin.setText("");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

56
}

else

JOptionPane.showMessageDialog(null,"Password does not match");

private void backActionPerformed(java.awt.event.ActionEvent evt) {

this.hide();

57
Home page

private void quicklblMouseClicked(java.awt.event.MouseEvent evt) {

new Quick(p).setVisible(true);

private void depositlblMouseClicked(java.awt.event.MouseEvent evt) {

new Deposit(p).setVisible(true);

private void withdrawlblMouseClicked(java.awt.event.MouseEvent evt) {

new Withdraw(p).setVisible(true);

private void changelblMouseClicked(java.awt.event.MouseEvent evt) {

new Chnagepin(p).setVisible(true);

private void balancelblMouseClicked(java.awt.event.MouseEvent evt) {

new Balance_enquery(p).setVisible(true);

private void minilblMouseClicked(java.awt.event.MouseEvent evt) {

new Ministatement(p).setVisible(true);

58
private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {

this.hide();

59
Login form

package atm_project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.*;

private void jLabel4MouseClicked(java.awt.event.MouseEvent evt) {

Admin_login obj=new Admin_login();

obj.show();

private void loginActionPerformed(java.awt.event.ActionEvent evt) {

pass=txtpin.getText();

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:atm");

Statement stmt= con.createStatement();

String query="select*from users where pin='"+pass+"'";

ResultSet res= stmt.executeQuery(query);

60
if(res.next())

new Home(pass).setVisible(true);

else

JOptionPane.showMessageDialog(null,"Incorrect PIN");

catch (Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

61
Mini statement

package atm_project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import javax.swing.table.DefaultTableModel;

private void formWindowActivated(java.awt.event.WindowEvent evt) {

DefaultTableModel m=(DefaultTableModel) tb.getModel();

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection c=DriverManager.getConnection("jdbc:odbc:atm");

Statement state=c.createStatement();

String query;

ResultSet res;

//Removing all rows;

int rows=m.getRowCount();

for(int i=0;i<rows;i++)

m.removeRow(0);

62
}

query="select * from transaction ";

res=state.executeQuery(query);

while(res.next())

m.addRow(new Object[] {
res.getString(1),res.getString(2),res.getString(3),res.getString(4),res.getString(5)});

}catch(Exception e)

{}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

this.hide();

63
Quick Access

package atm_project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

private void formWindowActivated(java.awt.event.WindowEvent evt) {

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection c=DriverManager.getConnection("jdbc:odbc:atm");

Statement state=c.createStatement();

String query;

query="select * from transaction";

ResultSet res=state.executeQuery(query);

int n=100;

while(res.next())

n=Integer.parseInt(res.getString(1));

64
}

id=n+1;

catch(Exception e)

JOptionPane.showMessageDialog(this, e.getMessage());

private void l200MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l200.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

65
{

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

66
catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l500MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l500.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

67
{

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l1000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

68
{

namount=Integer.parseInt(l1000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

69
Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l2000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l2000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

70
if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

71
}

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l5000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l5000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

72
if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l10000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

73
try

namount=Integer.parseInt(l1000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

74
stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

this.hide(); // TODO add your handling code here:

75
Withdraw formprivate void formWindowActivated(java.awt.event.WindowEvent evt) {

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection c=DriverManager.getConnection("jdbc:odbc:atm");

Statement state=c.createStatement();

String query;

query="select * from transaction";

ResultSet res=state.executeQuery(query);

int n=100;

while(res.next())

n=Integer.parseInt(res.getString(1));

id=n+1;

catch(Exception e)

JOptionPane.showMessageDialog(this, e.getMessage());

76
}

private void l200MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l200.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

77
JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l500MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

78
namount=Integer.parseInt(l500.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

79
String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l1000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l1000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

80
{

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

81
catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l2000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l2000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

82
{

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l5000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

83
{

namount=Integer.parseInt(l5000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

84
Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l10000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l1000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

85
if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

86
}

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

this.hide(); // TODO add your handling code here:

}private void formWindowActivated(java.awt.event.WindowEvent evt) {

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection c=DriverManager.getConnection("jdbc:odbc:atm");

Statement state=c.createStatement();

String query;

query="select * from transaction";

ResultSet res=state.executeQuery(query);

int n=100;

while(res.next())

n=Integer.parseInt(res.getString(1));

87
}

id=n+1;

catch(Exception e)

JOptionPane.showMessageDialog(this, e.getMessage());

private void l200MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l200.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

88
}

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

89
}

private void l500MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l500.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

90
}

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l1000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

91
namount=Integer.parseInt(l1000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

92
String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l2000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l2000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

93
damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

94
{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l5000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(l5000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

95
JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void l10000MouseClicked(java.awt.event.MouseEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

96
namount=Integer.parseInt(l1000.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

97
String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

this.hide(); // TODO add your handling code here:

98
Withdraw form

package atm_project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

private void withdrawActionPerformed(java.awt.event.ActionEvent evt) {

int damount=0,namount=0,total;

String deposit="";

try

namount=Integer.parseInt(txtamt.getText());

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con2=DriverManager.getConnection("Jdbc:Odbc:atm");

Statement stmt=con2.createStatement();

String querry="select * from users where pin='"+p+"'";

ResultSet res=stmt.executeQuery(querry);

if(res.next())

damount=Integer.parseInt(res.getString("balance"));

99
else

JOptionPane.showMessageDialog(null,"not found");

if(damount<namount)

JOptionPane.showMessageDialog(this, "Insufficient balance");

else

total=damount-namount;

String str="update users set balance="+total+" where pin='"+p+"'";

stmt.executeUpdate(str);

Statement stmt2=con2.createStatement();

String mode="withdraw";

String str2="insert into transaction


values("+id+",'"+deposit+"','"+mode+"',"+namount+","+damount+")";

stmt2.executeUpdate(str2);

JOptionPane.showMessageDialog(null,"Withdrawn successfully");

catch(Exception e)

{JOptionPane.showMessageDialog(null,e.getMessage());}

100
private void formWindowActivated(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection c=DriverManager.getConnection("jdbc:odbc:atm");

Statement state=c.createStatement();

String query;

query="select * from transaction";

ResultSet res=state.executeQuery(query);

int n=100;

while(res.next())

n=Integer.parseInt(res.getString(1));

id=n+1;

catch(Exception e)

101
{

JOptionPane.showMessageDialog(this, e.getMessage());

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

this.hide();

102
CONCLUSION

After having completed this project, We felt that it was an excellent learning experience as I deal
with a real life project that give a opportunity to working for the students to make their test more
easy, while working on this project I got a good exposure to the sharp programming skills and the
various programming techniques while coding for this system I was exposed to the vast knowledge
about the strength and weakness of JAVA language .

A part from this I have been able to appreciate the hard work of programmers spent in developing
such a system the most important realization was the amount of cooperation, dedication, hard work
and team spirit that goes into making of a successful project.

103
FUTURE ENHANCEMENT

The project made me realize the significance of developing software for client, where all the

eventualities have to be taken care of, unlike at educational institution, where the sole aim is to

learn. What may be seen to the developed to be a software complete in all respects, We was

required to meet the stringent demands of the in-house client in the materials department.

Through this seemed tough at first, We realized that pressure goaded us on to develop better and

better applications.

During the project, the real importance for following all the principle of System Analysis

and Design drawled on me. We felt the necessity of going through the several stages, because

only such a process could make one understand the problems at hand, more so due to the

enormous size of data stores involved and their manipulation

In retrospect, we would like to say that the institute provided us with sample opportunities

to learn Oracle 8 and its tools. we specifically was able to learn MS-ACCESS and its Tools. We

specially was able to learn JAVA I also succeeded in understanding a number of tricky concept in

database, which were earlier only hazy blobs in the realm of our comprehension. However my

project Inventory management is an asset to the organization, even then FURTHER

ENHANCEMENT are possible in this project such as new forms & reports can be included as

and when required.

104
BIBLIOGRAPHY

The following are the books references that have been studied in the duration of making of this
project.

 Mastering Java Netbeans 6.5


Author EBALAGURSWAMI
Publisher MC GRAY HILL
 Oracle The Complete Reference
Author Robert Koch
Publisher Tata MCGraw - Hill
Microsoft office

WEB REFRENCES

www.microsoft.com

105

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy