Atm Management System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 40

ATM System Simulation

ABSTRACT

The ATM System Simulation is a banking application developed to perform different banking
services. The following functions are included like cash deposit, cash withdrawals, balance enquiry,
cash transfer. This application is designed to maintain the information of various customers
accounts including the transactions made by the customers through the ATM System.

Department of Computer Science, SGT College, 1


ATM System Simulation

CHAPTER-1 INTRODUCTION

The ATM System Simulation is a java based application developed as a prototype with the similar
functionalities of real ATM (Automated Teller Machines) that includes the basic functionalities like
cash withdrawal, cash transfer, balance enquiry and other basic services to the bank customer. The
ATM system simulation designed as per the requirement of the end user in which the gateway of the
application is through the verification of primary credential details like username and PIN (Personal
Identification Number). In this application the role of PIN is the primary entity through which the
user/customer can access all the services provided by the ATM simulator. In earlier years most of
the transactions were done manually, still done but very rarely, as it is difficult task. ATM gives an
easy and faster transaction phase. Thus our project is a good task to have transactions easier and
faster. The ATM system simulation is a banking application developed to perform different banking
services through the Automated Teller Machines. It also stores the operations and transactions done
by the costumer. The End users are the respective bank customers, who can utilize the complete
services in a secured manner provided by the proposed application. The application design
maintains the database that stores and retrieves the basic information regarding the username, 4 digit
PIN, balance amount and other financial transactions of various customers by considering the
complete security and safety measures.

Department of Computer Science, SGT College, 2


ATM System Simulation

Problem Statement
To design and develop java based stand alone ATM (Automated Teller Machine) application that
provides the financial services to the bank customers with all the security measures through a
unique PIN and centralized database using My SQL.

Aim of Project
The application provides complete secure transactions through isolated PIN, which is an important
gateway of the application. This application is more helpful to know the complete details like
transactions done and personal information of any bank customer. If the customer is new user to the
ATM application, can get authorization by registering through the registration form provided in the
main menu. We also aimed to develop user friendly software and flexibility, which makes the end
users interact easily and provide a better updated way than the existing system.

Existing system
The current ATM system provides the services like cash transactions, by providing an authenticated
PIN in which they are more chances of hacking the secret code by the other unauthorized users or
network hackers. Through this, the system is less unreliable for the bank customers in which the
security issues are not well-defined that affects the integrity of the system.

Proposed system
To design and implement the simulated ATM system application using the java technology and
database modules. The proposed application will define the consistency, uniqueness, accuracy,
reliability, security and integrity of the ATM system trough simulation.

Department of Computer Science, SGT College, 3


ATM System Simulation

CHAPTER-2
HARDWARE AND SOFTWARE REQUIREMENT SPECIFICATION

Hardware Requirement Specification:


 Processor :Intel core i3
 RAM :4 GB
 Hard disk :1 TB

Software Requirement Specification:


 Operating System :Windows 10
 Programming Language :JAVA
 IDE :Eclipse 2019-09
 Database :My SQL 5.5

Department of Computer Science, SGT College, 4


ATM System Simulation

CHAPTER-3

Software Development Process Model Adopted


This document plays a vital role in development of life cycle as it describes the complete
requirements of the system. SPIRAL MODEL was defined by Barry Boehm in his 1998 article “A
spiral models of Software Development and Enhancement”. This model was not the first model to
discuss iterative development, but it was the first model to explain why the iteration models. Spiral
model is a combination of sequential and prototype model. This model is best used for large projects
which involves continuous enhancements. Where the output is a small prototype of the large
software.

Spiral Model

Department of Computer Science, SGT College, 5


ATM System Simulation

Stages in SDLC
1. Feasibility analysis
2. Requirement analysis
3. Design
4. Coding
5. Testing
6. Maintenance

Feasibility analysis
Feasibility analysis includes analysis of project requirements in terms of input data and desired
output, processing required to transform input into output, cost-benefit analysis, and schedule of the
project.

Requirement analysis
Requirement analysis and specification includes gathering, analyzing, validating, and specifying
requirements. At the end of this phase, the software Requirements Specification (SRS) document is
prepared.
SRS is a formal document that acts as a written agreement between the development team and the
customer. SRS acts as input to the design phase and includes functional, performance, software,
hardware, and network requirements of the project.

Design
Design stage takes as its initial input the requirements identified in the approved requirements
document. For each requirement, a set of one or more design elements will be produced as a result
of interviews, workshops, and or prototype efforts. Design elements describe the desired software
features in details, and generally include functional hierarchy diagrams, screen layout diagrams,
tables of business rules, business process diagrams, pseudo code, and a complete entity-relationship
diagram with a full data dictionary. Design phase includes translation of the requirements specified
in the SRS into a logical structure that can be implemented in a programming language. The output
of the design phase is a design document that acts as an input.

Department of Computer Science, SGT College, 6


ATM System Simulation

Coding
The coding stage takes as it primary input the design elements described in the approved design
document. For each design element, a set of one or more software artefacts will be produced.
Software artifacts include but are not limited to menus, dialogs, data management forms, data
reporting formats, specialized procedures and functions. Appropriate test cases will be developed to
guide users in their interactions with the software. Coding stage includes implementation of the
design specified in the design document into executable programming language code.

Testing
Testing phase include the detection of errors in the software. The testing process starts with a test
plan that recognizes test-related activities, such as test case generation, testing criteria, and resource
allocation for testing. The code is tested and mapped against the design document created in the
design phase. The output of the testing phase is a test report containing errors that occurred while
testing the application. During the integration and test stage, the software artefacts, online help, and
test data are migrated from the development environment to a separate test environment.

Maintenance
Maintenance phase includes implementation of changes that software might undergo over a period
of time, or implementation of new requirements after the software is deployed at the customer
location. The maintenance phase also includes handling the residual errors that may exist in the
software even after the testing phase. Maintenance team will start with requirement study,
understanding of document later employee will be assigned work and they will undergo training on
that particular assigned category.

Department of Computer Science, SGT College, 7


ATM System Simulation

System design
The developed application is considered to the version upon the system, which is proposed to be
built with the content and touch of the My SQL as the centralized database. Java is the Front-end of
the application. The entire application is designed in eclipse.
The initial phase of the proposed application development incorporates the basic software design
models of the software engineering such as waterfall model, spiral model and conceptual model.
The very beginning of the software application involves designing of the basic prototype model with
the fundamental requirement specifications formed during the preparation of problem statement and
the objectives to reach the customer or end-user requirement. Initially the system is designed with
the following four modules

1-Registration module
2-Transaction module
3-Login module

All the above said modules are the core functionalities of the proposed ATM system simulation.
The application is developed in such a way, where any forms or module can be changed or updated
with a new requirement of the client. This flexibility in achieved through the spiral software model,
because the spiral approach is a combination of sequential and prototype. This features in spiral
model will make the software developers to include during the new software application
development, especially in developing large projects which includes a major enhancements and
frequent changes or updating to reach the client functional requirements.

Department of Computer Science, SGT College, 8


ATM System Simulation

CHAPTER-4 DESIGN MODELS

Class Diagram:

Department of Computer Science, SGT College, 9


ATM System Simulation

Use Case Diagram:

Department of Computer Science, SGT College, 1


ATM System Simulation

Sequence Diagram:

Customer ATM System

1: Login

2: Main Menu Verify ()

Banking

Cash Transactions PIN


Enter PIN

Verify ()
Successful Perform Transactions
Logout

End session

Department of Computer Science, SGT College, 1


ATM System Simulation

Activity Diagram:

Login/Registration

[INVALID]

[VALID]

Main Menu

Deposit Withdraw Transfer Balance Enquiry

PIN PIN PIN PIN

Cash Deposit Withdraw Cash Cash Transfer Check Balance

Logout

Department of Computer Science, SGT College, 1


ATM System Simulation

CHAPTER-5
Implementation

Implementation is the stage of the project when the theoretical design is turned into working system.
It can be considered to be the most critical stage in achieving a successful new system and in giving
the user, confidence that the new system will work and effective. The goal of the coding phase is to
translate the design into code in the given programming language. The coding steps translate the
detailed design of the system into programming language. The translation process continues when
the compiler accepts source code as input and produces machine dependent object code as output.
Linking of object files are done to produce the machine code. Internal documentation is another
important factor, to facilitate others to understand the code and the logic.

My SQL

My SQL is an open-source relational database management system (RDBMS). Its name is a


combination of "My", the name of co-founder Michael Widenius's daughter and "SQL" is the
abbreviation for Structured Query Language. My SQL is free and open-source software under the
terms of the GNU General Public License, and is also available under a variety
of proprietary licenses. My SQL was owned and sponsored by the Swedish company My SQL AB,
which was bought by Sun Microsystems.

My SQL is a component of the LAMP web application software stack (and others), which is an
acronym for Linux, Apache, My SQL, Perl/PHP/Python. My SQL is used by many database-driven
web applications, including Drupal, Joomla, phpBB, and Word Press. My SQL is also used by many
popular websites, including Facebook, Flicker, Media Wiki, Twitter, and YouTube.

We want the My SQL database to be:

 Easy to use

 Free from Bugs

 Available and affordable for all

 Fun to operate and improve

Department of Computer Science, SGT College, 1


ATM System Simulation

Eclipse

Eclipse is an integrated development environment (IDE) used in computer programming, and is


the most widely used Java IDE. It contains a base workspace and an extensible plug-in system for
customizing the environment. Eclipse is written mostly in Java and its primary use is for
developing Java applications, but it may also be used to develop applications in other
programming languages through the use of plugins, including: Adda, ABAP, C, C++, COBOL, D,
Fortran, Haskell, JavaScript, Julia, Lasso, Lua, NATURAL, Perl, PHP, Prolog, Python, R, Ruby
(including Ruby on Rails framework), Rust, Scala, Clojure, Groovy, Scheme, and Erlang. It can
also be used to develop documents with Latex (through the use of the TeXlipse plugin) and
packages for the software Mathematica. Development environments include the Eclipse Java
development tools (JDT) for Java and Scala, Eclipse CDT for C/C++ and Eclipse PDT for PHP,
among others.

The initial codebase originated from IBM Visual Age. The Eclipse software
development kit (SDK), which includes the Java development tools, is meant for Java developers.
Users can extend its abilities by installing plug-ins written for the Eclipse Platform, such as
development toolkits for other programming languages, and can write and contribute their own
plug-in modules.

Released under the terms of the Eclipse Public License, Eclipse SDK is free and open-source
software, although it is incompatible with the GNU General Public License. It was one of the first
IDEs to run under GNU Class path and it runs without problems under Iced Tea.

Department of Computer Science, SGT College, 1


ATM System Simulation

Programming

Language Java

Java is a general-purpose programming language that is class-based, object-oriented, and designed


to have as few implementation dependencies as possible. It is intended to let application
developers write once, run anywhere (WORA), meaning that compiled Java code can run on all
platforms that support Java without the need for recompilation. Java applications are typically
compiled to byte code that can run on any Java virtual machine (JVM) regardless of the
underlying computer architecture.

 Java is a programmer’s language


 Java is cohesive and consistent
 Except for those constraint imposed by the Internet environment. Java gives the programmer
complete control

Sun Microsystems released the first public implementation as Java 1.0 in 1996. It provides no-cost
run-times on popular platforms. Fairly secure and featuring configurable security, it allowed
network- and file-access restrictions. Major web browsers soon incorporated the ability to run Java
applets within web pages, and Java quickly became popular. Other possible advantages of Java
include
 Object-oriented
 Platform independence
 Excellent networking capabilities
 Wide variety of Application Programmer Interfaces (APIs)

Java is platform independent

Java technology is said to be platform independent due to its flexible supporting on all available
operating systems with respect to its development and compilation. (Platform represents Operating
System). Java is a platform independent programming language, because when you install Java
Development Toolkit software on your system then automatically Java Virtual Machine are installed
on your system. For every operating system separate JVM is available which is capable to read
the .class file or byte code.

Department of Computer Science, SGT College, 1


ATM System Simulation

Figure 1: Java is Platform Independent

Java Swing

Swing is a GUI widget toolkit for Java. Swing was developed to provide a more sophisticated set of
GUI components than the earlier Abstract Window Toolkit (AWT). Swing provides a look and
feel that emulates the look and feel of several platforms, and also allows applications to have a look
and feel unrelated to the underlying platform. It has more powerful and flexible components than
AWT. In addition to familiar components such as buttons, check boxes and labels, Swing provides
several advanced components such as tabbed panel, scroll panes, trees, tables, and lists. Unlike
AWT components, Swing components are not implemented by platform-specific code. Instead, they
are written entirely in Java and therefore are platform-independent. The term "lightweight" is used
to describe such an element.

Department of Computer Science, SGT College, 1


ATM System Simulation

Figure 2: Swing Hierarchy

Swing Packages
Some of the packages in Swing

1. javax.swing.text
2. javax.swing.plaf.multi
3. javax.swing.text.html
4. javax.swing.text.html.parser
5. javax.swing.text.rtf
6. javax.swing.tree
7. javax.swing.undo
8. javax.accessibility
9. javax.swing
10. javax.swing.border

Department of Computer Science, SGT College, 1


ATM System Simulation

Advantages of Swing

1. Provides both additional functionalities and added components to AWT-replacement components


2. Swing components are platform-independent.
3. Swing components can use a different look and feel.
4. Swing components use the Model-View-Controller paradigm (MVC) and thus can provide a
much more flexible UI.
5. Swing components are lightweight (are less resource-intensive than AWT).
6. Swing provides built-in double buffering.
7. Swing provides paint debugging support for when you build your own components.

Department of Computer Science, SGT College, 1


ATM System

CHAPTER-6 SAMPLE CODING

Login Page

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;

public class first_atm extends JFrame implements


ActionListener{ JTextField txtuser=new JTextField(25);
JPasswordField txtpass=new
JPasswordField(25); JLabel lbluser=new
JLabel("Username: "); JLabel lblpass=new
JLabel("Pin Number: ");
JButton btnOk=new JButton(new ImageIcon("register.jpg"));
JButton btnRegister=new JButton(new ImageIcon("button.jpg"));
//JButton btnBlock = new JButton("Lock Account >>");
Connection cn;
Statement st;
PreparedStatement ps;
public first_atm(){
JPanel pane=new JPanel();
pane.setLayout(null);
pane.add(txtuser);
pane.add(txtpass);
pane.add(lbluser);
pane.add(lblpass);
pane.add(btnOk);
pane.add(btnRegister);
lbluser.setBounds(10,20,80,20);
lblpass.setBounds(10,40,80,20);
txtuser.setBounds(100,20,100,20);
txtpass.setBounds(100,40,100,20);
btnOk.setBounds(50,70,75,20);
Department of Computer Science, SGT College, Ballari 19
ATM System
btnRegister.setBounds(125,70,83,20);
btnOk.addActionListener(this);
btnRegister.addActionListener(this);
setContentPane(pane);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel lbl = new JLabel();
lbl.setBounds(0,0,250,150);
pane.add(lbl);
try{ Class.forName("com.mysql.jdbc.Driv
er");
cn = DriverManager.getConnection("jdbc:mysql://localhost:3306/atm","root","root");
}catch(ClassNotFoundException e)
{ System.err.println("Failed to load driver");
e.printStackTrace();
}catch(SQLException e)
{ System.err.println("Unable to
connect"); e.printStackTrace();
}
}
public void actionPerformed(ActionEvent e)
{ Object source=e.getSource()
if(source==btnOk){
try{
String str1=txtuser.getText();
String str2=txtpass.getText();
if((str1.length()==0 || str2.length()==0))
{ JOptionPane.showMessageDialog(null,"Connot be
Process","WARNING",JOptionPane.WARNING_MESSAGE);
}
else{ st=cn.createStatem
ent(); String strUser="";
String strPass="";
ResultSet rs=st.executeQuery("SELECT * FROM tbl_list WHERE UserName='"+str1+"'");
while(rs.next()){

Department of Computer Science, SGT College, 2


ATM System
strUser=rs.getString(1);
strPass=rs.getString(4);
}
st.close();
if(strUser.equals(str1))
{ if(strPass.equals(str2))
{
JOptionPane.showMessageDialog(null,"Welcome
"+txtuser.getText(),"Welcome",JOptionPane.INFORMATION_MESSAGE);
third_atm panel = new third_atm();
panel.setSize(330,300);
panel.setVisible(true);
panel.setResizable(false);
panel.setLocation(400,250);
dispose();
}else{
JOptionPane.showMessageDialog(null,"Username found but the password is incorrect!","Security
Pass",JOptionPane.WARNING_MESSAGE);
txtpass.requestFocus(true);
}
}else{
JOptionPane.showMessageDialog(null,"Username is incorrect!","Security
Pass",JOptionPane.WARNING_MESSAGE);
txtuser.requestFocus(true);
}
}
}catch(SQLException w){
}
}else if(source==btnRegister)
{ second_atm panel = new second_atm();
panel.setSize(370,400);
panel.setVisible(true);
panel.setResizable(false);
panel.setLocation(400,250);
dispose();

Department of Computer Science, SGT College, 2


ATM System
}

Department of Computer Science, SGT College, 2


ATM System
else if(source == btnBlock){
int n=JOptionPane.showConfirmDialog(null,"If you lock this account,you cannot access
this Anymore.Are you sure you want to Lock this
account?","Warning",JOptionPane.YES_NO_OPTION); if(n==JOptionPane.YES_OPTION)
{
try{ st=cn.createStateme
nt(); String strUser="";
String strPass="";
ResultSet rs=st.executeQuery("SELECT * FROM

WHERE UserName='"+txtuser.getText()+"'");
while(rs.next()){
strUser=rs.getString(1);
strPass=rs.getString(5);
}
if(strUser.equals(txtuser.getText()))
{ if(strPass.equals(txtpass.getText())){
ps = cn.prepareStatement("DELETE FROM tbl_Info WHERE UserName ='"+ txtuser.getText() +
"'");
ps.executeUpdate();
JOptionPane.showMessageDialog(null,"Your Account has been successfully
Lock.","ATM",JOptionPane.INFORMATION_MESSAGE);
txtuser.requestFocus(true);
txtuser.setText("");
txtpass.setText("");
}else{
JOptionPane.showMessageDialog(null,"Username found but the Pin Number is
incorrect!","Security Pass",JOptionPane.WARNING_MESSAGE);
txtpass.requestFocus(true);
}
}else{
JOptionPane.showMessageDialog(null,"Username is incorrect!","Security
Pass",JOptionPane.WARNING_MESSAGE);
txtuser.requestFocus(true);

Department of Computer Science, SGT College, 2


ATM System
}
}
catch(SQLException s){
System.out.print("SQL statement is not executed!");
}
catch(Exception j){
j.printStackTrace();
}
}
}*/
}
public static void main(String[]args)
{ first_atm log=new first_atm();
log.setLocation(400,250);
log.setSize(250,150);
log.setTitle("Log-In");
log.setResizable(false);
log.setVisible(true);
}
}

Department of Computer Science, SGT College, 2


ATM System

Register Page

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;

public class second_atm extends JFrame implements ActionListener


{
public static void main(String[]args)
{ second_atm panel = new second_atm();
panel.setSize(450,450);
panel.setVisible(true);
panel.setResizable(false);
panel.setLocation(400,250);
}
Font f1 = new Font("", Font.BOLD, 10);
JLabel lblUser = new JLabel("User Name ",JLabel.RIGHT);
JLabel lblFName = new JLabel("First Name
",JLabel.RIGHT);
JLabel lblVPass = new JLabel("Verify Pin Number ",JLabel.RIGHT);
JLabel lblLName = new JLabel("Last Name ",JLabel.RIGHT);
JTextField txtFName= new JTextField(20);
JTextField txtLName = new JTextField(20);
JPasswordField txtPass= new JPasswordField(20);
JPasswordField txtVPass = new JPasswordField(20);
JTextField txtday = new JTextField(20);
JTextField txtmonth = new JTextField(20);
JTextField txtyear = new JTextField(20);
JTextField txtCash = new JTextField(20);
JTextField txtPhone = new JTextField(20);
JButton btnCret = new JButton(new ImageIcon("reg.jpg"));
Connection cn;
Statement st;

Department of Computer Science, SGT College, 2


ATM System
PreparedStatement ps;

Department of Computer Science, SGT College, 2


ATM System
public void clear()
{
txtUser.setText("");
txtFName.setText("");
txtPass.setText("");
txtLName.setText("");
txtVPass.setText("");
}
lbl.setBounds(0,0,500,500);
pane.add(lbl);
setContentPane(pane);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pane.setBorder(BorderFactory.createTitledBorder( BorderFacto
ry.createEtchedBorder(), "Registration Form")); try{
Class.forName("com.mysql.jdbc.Driver");
cn = DriverManager.getConnection("jdbc:mysql://localhost:3306/atm","root","root");
}catch(ClassNotFoundException e)
{ System.err.println("Failed to load driver");
e.printStackTrace();
}
catch(SQLException e)
{ System.err.println("Unable to
connect"); e.printStackTrace();
}
}
public void actionPerformed(ActionEvent e)
{ Object source = e.getSource();
if(source == btnCret){
String suser = txtUser.getText();
String sname = txtFName.getText();
String spass = txtPass.getText();
String slname = txtLName.getText();
String svpass = txtVPass.getText();
String sphono = txtPhone.getText();

Department of Computer Science, SGT College, 2


ATM System
if((suser.length()==0 || sname.length()==0 || spass.length()==0 || slname.length()==0 ||
svpass.length()==0 )){
JOptionPane.showMessageDialog(null,"Some Fields are
empty","WARNING",JOptionPane.WARNING_MESSAGE);
}
else if(spass.length()>4)
{
txtPass.setText("");
txtVPass.setText("");
JOptionPane.showMessageDialog(null,"Invalid
password","WARNING",JOptionPane.WARNING_MESSAGE);
}
else if(sphono.length()>10 || sphono.length()<10)
{
txtPhone.setText("");
JOptionPane.showMessageDialog(null,"Enter a vaild Phone
number","WARNING",JOptionPane.WARNING_MESSAGE);
}
else{ if(spass.equals(svp
ass)){ boolean xx =
false;
try{
st= cn.createStatement();
rs=st.executeQuery("SELECT * FROM tbl_list WHERE Password = '" + spass + "'");
while(rs.next()){
String spass2 =rs.getString(4);
xx = true;
JOptionPane.showMessageDialog(null,"Pincode already
used","Information",JOptionPane.INFORMATION_MESSAGE);
}
st.close();
if(xx==false){
try{
st= cn.createStatement();
catch(SQLException s){

Department of Computer Science, SGT College, 2


ATM System
System.out.println("SQL Error" + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
}
catch(Exception x){
System.out.println("Error" + x.toString()+" " + x.getMessage());
}
}
else{
JOptionPane.showMessageDialog(null,"Verify your
password.","ATM",JOptionPane.INFORMATION_MESSAGE);
}

Department of Computer Science, SGT College, 2


ATM System

Withdraw Page
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;
public class wdraw_trans extends JFrame implements
ActionListener{ JPasswordField txtuser=new JPasswordField(25);
JTextField txtpass=new JTextField(25);
JTextField txtwid=new JTextField(25);
JLabel lbluser=new JLabel("Pin Number: ");
JLabel lblpass=new JLabel("WithDraw: ");
JLabel lblwid=new JLabel("Balanced: ");
pane.add(txtwid);
pane.add(lbluser);
pane.add(lblpass);
pane.add(lblwid);
pane.add(btnOk);
pane.add(btnRegister);
BorderFactory.createEtchedBorder(), "Withdraw Transaction"));
JLabel lbl = new JLabel(new ImageIcon(""));
lbl.setBounds(0,0,250,200);
pane.add(lbl);
}else{ if(b<10)
{
int sum = a-b;
txtpass.setText((sum+""));
txtwid.setText("");
ps.executeUpdate();
txtuser.requestFocus(true);
}
}
}st.close();
}catch(NumberFormatException nfe){

Department of Computer Science, SGT College, 3


ATM System
JOptionPane.showMessageDialog(null,"Enter now the amount to
withdraw","ATM",JOptionPane.INFORMATION_MESSAGE);
}
}
public static void main(String[]args)
{ wdraw_trans log=new wdraw_trans();
log.setLocation(400,250);
log.setSize(250,200);
log.setResizable(false);
log.setVisible(true);
}
}

Balance Page
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;
public class bal_trans extends JFrame implements ActionListener{

JPasswordField txtuser=new JPasswordField(25);


JTextField txtpass=new JTextField(25);
JLabel lbluser=new JLabel("Pin Number: ");
JLabel lblpass=new JLabel("Balanced");
JButton btnOk=new JButton("Back to Menu");
JButton btnRegister=new JButton("Bal.Inquire");
pane.add(txtuser);
pane.add(txtpass);
pane.add(lbluser);
pane.add(lblpass);
pane.add(btnOk);
pane.add(btnRegister);
txtpass.setBounds(100,40,100,20);
btnOk.setBounds(80,120,140,20);
btnRegister.setBounds(100,70,100,20);

Department of Computer Science, SGT College, 3


ATM System

btnOk.setForeground(Color.yellow);
btnRegister.setForeground(Color.yellow);
btnOk.setBackground(Color.black);
btnRegister.setBackground(Color.black);
setContentPane(pane);
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
}catch(SQLException e)
{ System.err.println("Unable to
connect"); e.printStackTrace();
}
ResultSet rs=st.executeQuery("SELECT * FROM tbl_list WHERE Password
='"+txtuser.getText()+"'");
while(rs.next())
{ txtpass.setText(rs.getString(9));
JOptionPane.showMessageDialog(null,"Record Found.","ATM
System",JOptionPane.INFORMATION_MESSAGE);

}
st.close();
}
catch(SQLException s)
{ System.out.println("No record found!\n\n\
n");
System.out.println("SQL Error" + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
}
catch(Exception x){
System.out.println("Error" + x.toString()+" " + x.getMessage());
}

}
}

public static void main(String[]args)


{ bal_trans log=new bal_trans();

Department of Computer Science, SGT College, 3


ATM System
}

Department of Computer Science, SGT College, 3


ATM System

CHAPTER-7 SYSTEM TESTING

Testing
Testing is a process, which reveals errors in the program. It is the major quality measure employed
during software development. During testing, the program is executed with a set of test cases and
the output of the program for the test cases is evaluated to determine if the program is performing as
it is expected to perform.

Testing Strategies
Unit Testing
Unit testing focuses verification effort on smallest unit of software design module. All the modules
in this system are tested under this strategy of unit test. In this each line of the code were tested. We
encountered several general syntax errors, which we corrected during the compilation. In the Login
Page we check for username and password if valid username and password is given then it proceeds
to main page.
In registration module we enroll a new user with submitting primary credentials. In transaction
module we deal with all the banking services provided by the application.

Integration Testing
Integration testing ensures that software and subsystems work together a whole. It tests the
interface of all the modules to make sure that the modules behave properly when integrated
together. The goal of this testing is to detect design errors, while focusing on testing the
interconnection between modules.
In this testing we check whether the number of text fields specified in the design should match with
the number of entities in the database.

Department of Computer Science, SGT College, 3


ATM System

Validation Testing

The process of evaluating software during the development process or at the end of the
development process to determine whether it satisfies specified requirements. Validation Testing
ensures that the product actually meets the client's needs. It can also be defined as to demonstrate
that the product fulfils its intended use when deployed on appropriate environment.

System Testing
Here the entire software system is tested. The reference document for this process is the
requirements document, and the goals to see if software meets its requirements. Here entire
software has been tested against requirements of project and it is checked whether all requirements
of project have been satisfied or not.

Department of Computer Science, SGT College, 3


ATM System

CHAPTER-8 OUTPUT SCREENS

Register Page

Login Page (Registered users only)

Department of Computer Science, SGT College, 3


ATM System

Main menu Page

Deposit

Department of Computer Science, SGT College, 3


ATM System

Withdraw Page

Transfer Page

Department of Computer Science, SGT College, 3


ATM System

Balance enquiry

Logout

Department of Computer Science, SGT College, 3


ATM System

CHAPTER-9

Conclusion
The ATM system simulator is designed and implemented to reach the functional requirements and
objectives of the end user. The system is secured by providing the authenticated 4 digit PIN, which
is the gateway to the application. The customer can function all the transactions in a secured manner
and use the application at any time in any place. This system is designed to benefit all its customers
to use in more effective & authenticated way. This simulator will provide the environment in which
new enhancements can be performed on it.

Future enhancement
The following enhancements can be done for the project.
 Use of Bio-metric authentication (Finger Print) can improve more security.
 Mini statement field can be added for the application.
 Improved GUI can be updated.

Bibliography
Books Referred
 JAVA 5 Programming (Black book) by Kogent Solutions
 Core Java 1.5 (Advance Features) by Cary Hortsman
 Software Engineering Principles by Roger Pressmen
 JAVA Complete Reference

Websites Referred
 www.google.com
 www.java.sun.com
 www.sourcecode.com

Department of Computer Science, SGT College, 4

You might also like