ATM Simulator System
ATM Simulator System
”
A PROJECT REPORT
SUBMITTED IN THE PARTIAL FULFILMENT OF THE REQUIREMENT
FOR THE AWARD OF THE DEGREE OF
PROJECT BY
NAME :-
ROLL NO :- 22MCA9266080
REGD. NO :- PG00144/2022
SESSION :- 2022-24
Page - 1 -
ABSTRACT
Page - 2 -
Now-a-days ATM (Automatic Teller Machines) is commonly used. It not only provides basic
transaction services (e.g.…withdraw, balance enquiry, mini statement, money transfer) but also
provide additional services like bill payments, mobile recharges, examination fees payment. But most
of these facilities are available only to the urban people and not to the rural people. The reason why
these facilities are not available to the rural people is illiteracy and the difficulty they face in
remembering the entire mechanism of handling an ATM machine. Our project aims at making the
ATM machines more user friendly (especially for rural people). And we are doing this by
constructing the simulator of real world ATM machine. As we know that simulator is a computerized
model of real world system that demonstrate the working of the real world system (on the basis of
certain assumptions) and can also be used to perform new experiments before it is deployed on the
real system. The technique by which we are going to make the simulator friendlier to rural people is
by enabling the simulator to be controlled by speech (i.e. any regional language).
So, in our project we are constructing a simulator that depicts the real world ATM machines and have
certain features which are as follows:
Works in networked environment, to demonstrate the real world ATM working environment.
Also, demonstrate the additional services provided by today‟s ATM machines, i.e. electricity
bill payment, telephone bill payment.
Enabling the simulator to be controlled by speech is the experiment we are going to perform
on the simulator.
Page - 3 -
INTRODUCTION
Page - 4 -
PROBLEM STATEMENT:
The real world ATM is continuously developing day by day. More and more new and exciting
features are incorporated in the machine as per customer‟s increasing needs. In the earlier times ATM
was only recognized for cash withdrawal or balance enquiry. But now a day various new features like
cash deposits, various Bill payments, Mobile recharge etc are added which are attracting more and
more customers. In spite of these advancements in the ATM world, the ATM is not successful in
rural areas. Most of the people are illiterate and even can‟t perform a simple transaction like cash
withdrawal due to language bondations. The same problem exists with the blind people. Providing
more and more language options is useless because they may not be able to read a text written on the
screen. Thus the existing system although growing day by day and fulfilling more and more needs of
customers fails in the case when simplicity and user friendliness is measured.
AIM:
The aim of this project is to simulate the real world ATM machine.
A real world automated teller machine (ATM) is a computerized telecommunications device that
provides the customers of a bank with access to financial transactions in a public space without the
need for a human clerk or bank teller. On most modern ATMs, the customer is identified by inserting
a plastic ATM card with a magnetic stripe or a plastic smartcard with a chip that contains a unique
card number, Bank account number and some security information, such as an expiration date or
CVC (CVV). Security is provided by the customer entering a personal identification number (PIN).
The real world ATM provides a keypad and a touch screen. There is cash dispensing machine from
which cash out can be accomplished. The cash dispensing machine optionally owns a cash In
mechanism (if cash deposit feature is enabled in ATM machine), from which user can deposit money
into his account. For customer‟s simplicity various language options are supported (like English,
Page - 5 -
Hindi etc). Various features provided by a real world ATM system are as follows:-
Cash Withdrawal
Cash Deposit
Money Transfer
Balance Enquiry
Bill Payments
PROPOSED SYSTEM:
The proposed system “Speech controlled ATM Simulator” provides all the basic as well as advanced
features of a standard real world ATM system. Along with it to add more simplicity and to make the
machine more user friendly two new concepts are added:-
Speech Synthesis-The ATM system will now help the user by guiding him throughout the transaction
by giving speech in his or her mother language.
Speech Recognition- The ATM system will now be able to recognize spoken commands. The
customer can now give voice commands in his mother language with the help of a microphone and
the ATM machine recognizes those spoken commands and takes the appropriate action.
FEASIBILITY STUDY:
Feasibility is the determination of whether or not a project is worth doing. The process followed in
making this determination is called a feasibility study. It determines whether a project should be
taken or not. Feasibility study was undertaken within tight constraints of time and culminated in the
written and amoral feasibility reports. The constants of the reports were used as a sound basis for the
decision of proceeding, postponing or the cancellation of the project. Depending on the results of the
initial investigation the survey is expanded to a more detailed feasibility study. Feasibility study is a
test of a system proposal according to its workability, impact on the organization, ability to meet user
needs, and effective use of resources.
Page - 6 -
Various types of feasibility are studies they are:-
1) Technical feasibility: - This is concerned with the specifying equipment and the software
that successfully satisfies the user requirement. The technical need of the system very
considerably. In examining the technical feasibility the configuration of the system is
given importance than to the actual hardware. As the present system devoid of computer
assistant a complete revamping of the whole set-up will be required. Can the work for the
new system we done with current environment existing software technology & available
personnel. So we can say there are a number of technical issues. Which are generally
raised during the technical feasibility there are follows -?
Does the necessary technology exist to do with what is suggested & can it required?
Does the propose requirement have the technical capacity to hold the data required to use
the new system?
Can the system we updated it developed?
What new skill will be required to new technology do the existing staff members have
these skills if not can they we trained in due course of time?
3) Economic Feasibility: - It is the most frequently used technique for the evaluation of the
effectiveness of the proposed system. It involves the cost/benefit analysis. Economic
feasibility is the most frequently used method for evaluating the effectiveness system.
More commonly known is cost beneficial the procedure is to determine the benefits and
savings that are expected from a system and compare them with costs. If benefit is more
than the costs then the decision are made to design is made to design and implement the
Page - 7 -
system.
After studying and testing the above feasibilities we have found that our project stands firmly on
them.
OVERVIEW OF DOCUMENT:
The primary goal of the document is to provide the entire information of the project. This includes
the need of the project, objectives of the project, and step-by-step implementation of SDLC (Software
Development Life Cycle). In case of our project the documentation describes the following details:
Current System.
Problem with current system
Proposed system
Modeling performed (Use cases analysis, sequence diagram, state chart diagram and
DFD)
System Design(Class Diagrams)
Testing Performed
Future Enhancements
Page - 8 -
DOCUMENT CONVENTIONS:
Page - 9 -
LITERATURE SURVEY
Page - 10 -
WHAT IS ATM?-
Automated Teller Machine (ATM), device used by bank customers to process account transactions.
Typically, a user inserts into the ATM a special plastic card that is encoded with information on a
magnetic strip. The strip contains an identification code that is transmitted to the bank's central
computer by modem. To prevent unauthorized transactions, a personal identification number (PIN)
must also be entered by the user using a keypad. The computer then permits the ATM to complete the
transaction; most machines can dispense cash, accept deposits, transfer funds, and provide
information on account balances. Banks have formed cooperative, nationwide networks so that a
customer of one bank can use an ATM of another for cash access.
Speech recognition (also known as automatic speech recognition or computer speech recognition)
converts spoken words to machine-readable input (for example, to key presses, using the binary code
for a string of character codes). The term "voice recognition" is sometimes incorrectly used to refer to
speech recognition, when actually referring to speaker recognition, which attempts to identify the
person speaking, as opposed to what is being said. Confusingly, journalists and manufacturers of
devices that use speech recognition for control commonly use the term Voice Recognition when they
mean Speech Recognition.
Speech recognition applications include voice dialing (e.g., "Call home"), call routing (e.g., "I would
like to make a collect call"), domotic appliance control and content-based spoken audio search (e.g.,
find a podcast where particular words were spoken), simple data entry (e.g., entering a credit card
number), preparation of structured documents (e.g., a radiology report), speech-to-text processing
(e.g., word processors or emails), and in aircraft cockpits (usually termed Direct Voice Input).
Page - 11 -
An isolated-word speech recognition system requires that the speaker pause briefly between words,
whereas a continuous speech recognition system does not. Spontaneous, or extemporaneously
generated, speech contains disfluencies, and is much more difficult to recognize than speech read
from script. Some systems require speaker enrollment---a user must provide samples of his or her
speech before using them, whereas other systems are said to be speaker-independent, in that no
enrollment is necessary. Some of the other parameters depend on the specific task. Recognition is
generally more difficult when vocabularies are large or have many similar-sounding words. When
speech is produced in a sequence of words, language models or artificial grammars are used to
restrict the combination of words.
WHAT IS SIMULATION?-
Simulation is the imitation of some real thing, state of affairs, or process. The act of simulating
something generally entails representing certain key characteristics or behaviours of a selected
physical or abstract system. A simulation is a representation of a situation with a similar but simpler
model that can easily be manipulated to determine experimental results. It is basically an experiment
run as a model of reality. Using a simulator or experimenting with a fictitious system can show the
eventual real effects of a given situation.
Examples:
Physical or manual simulations: These simulations rely on the use of physical methods to
create data that mimic the types of information required. Physical simulations are used in
many contexts, including the modeling of natural systems, and manual systems. Physical
methods, such as using a dice to simulate data have the disadvantage of being too time
consuming.
Page - 12 -
that can be used for network performance management. Some computer exercises that use a
computer program to generate data or information are TELPACK, CSIM19, and Minitab.
Physical simulation refers to simulation in which physical objects are substituted for the real thing
(some circles use the term for computer simulations modelling selected laws of physics, but this
article doesn't). These physical objects are often chosen because they are smaller or cheaper than the
actual object or system.
In our project we are performing computer simulation and creating a computerized model.
Simulation has been used effectively in many settings to teach skills that require both complex
problem solving abilities (e.g., nuclear power plant operators) as well as specific rote tasks (e.g.,
switchboard operators). Recently the increased availability, decreased cost, and emerging
technological advances associated with computers have made computer simulation a viable
alternative teaching method in a variety of settings. As a result, computer simulation has been used
increasingly as a cost-effective alternative to actual hands-on training. With technology, such as
Page - 13 -
ATMs, in which simulations may need to be used in training, it is likely that computers can provide
reasonably priced and realistic simulations that might provide for transfer of skills to community
settings.
ATM-SIM is designed as a multimedia training tool that provides individuals with intellectual
disabilities step-by-step instructions for learning how to use an ATM. Each step in the process, from
entering the ATM card, keying in an access code, selecting the desired transaction and completing
the transaction was simulated on the computer and presented to the user with step-by-step visual and
audio cues. Users interacted with the ATM-SIM system using a touch screen similar to actual
operation of an ATM. Each button and displayed message from a local ATM in the PLUS system of
ATMs was incorporated into the ATM-SIM system. Users were guided through each step of a desired
transaction via computer generated audio instructions and by visually highlighting the buttons that
needed to be pressed.
Despite the success and widespread use of Automatic Teller Machines (ATMs), a significant
proportion of bank customers can not or will not use them, or experience difficulties in their
interactions. Speech technology has been suggested as a means by which non-users might be
encouraged to use ATMs, while simultaneously improving usability for all. The potential advantages
of speech interfaces include hands-free and eyes-free use for physically- and visually impaired users,
and improved ease and speed of use through increased 'naturalness' of the interaction. This study
investigated user attitudes to the concepts of a speech-based ATM, via large-scale survey and a series
of focus groups. Objective performance was also considered in user trials with a prototype speech-
driven ATM. The idea of using speech for ATM transactions led to a number of concerns. Privacy
(the concern over one's personal financial details being overheard) and security (the fear of potential
attackers hearing the user withdraw cash) were the major reasons given. The user trials confirmed
that possible solutions, such as the adoption of a hood over the ATM or the use of a telephone
handset as the speech input/output device, were ineffective. Groups of impaired users, particularly
visually-impaired subjects, were more positive about the concept of speech, citing various difficulties
Page - 14 -
with current visual-manual interactions. Most non-users, however, would not be encouraged to use
ATMs with the addition of speech.
As per literature survey we have learned what an ATM is, what a simulation is and why we simulate
any real world system. So before we move further we must consider the following aspects regarding
ATM Simulator. The aspects are as follows-
Security: The security is the main concern in case of ATM machines. So this point must also
be considered in ATM Simulator. So secured handling of PIN (Personal Identification
Number) and secured manipulation of other information across the network must also take
place.
Functionality: The ATM Simulator must include all the possible basic and advanced features
that can be provided by a modern ATM machine.
Usability: Unlike the modern ATM machines the simulator should be useful to a wide range
of users and the users must use it without any assistance. The simulator must be user friendly
and must support multiple languages.
Efficiency: The simulator must be fast and easy in operation.
Service Extension: The simulator must be helpful to extend the functionalities of the real
world ATM machines. It means that the banks can experiment the enhancements on the
simulator before they implement it in the real world system.
Page - 15 -
TECHNOLOGY SURVEY
Page - 16 -
JAVA is the language used and in it following packages are used:
java.sql
java.awt
java.awt.event
javax.swing
java.awt.print
javax.print.attribute
java.sound.sampled
java.util
java.text
java.io
javax.speech
javax.speech.synthesis
javax.speech.recognition
javax.swing.filechooser
java.rmi
RmiJdbc
Simple
Object-oriented
Portable
Distributed
High performance
Interpreter
Multithreaded
Robust
Dynamic
Secure
Page - 17 -
Java program is both compiled and interpreted. With a compiler, you translate a Java program into an
intermediate language called Java byte codes- the platform-independent codes interpreted by the Java
interpreter. With an interpreter, each Java byte code instruction is parsed and run on the computer.
Compilation happens just once; interpretation occurs each time the program is executed. This figure
illustrates how this works.
Page - 18 -
Fig: Java program executions
One can think of Java byte codes as the machine code instructions for the Java Virtual Machine (Java
VM). Every Java interpreter, whether it's a Java development tool or a Web browser that can run Java
applets, is an implementation of the Java VM. The Java VM can also be implemented in hardware.
Java byte codes help make "write once, run anywhere" possible. You can compile your Java program
into byte codes on any platform that has a Java compiler. The byte codes can then be run on any
implementation of the Java VM. For example, the same Java program can run on Windows NT,
Solaris, and Macintosh.
java.sql
This package is used for avail of classes and drivers required for accessing and manipulating
databases through Java programs. The technology is termed as JDBC (Java Data Base Connectivity).
JDBC is a set of API which in use to wrap up SQL queries and then sends them to the target
database. Connecting a Java application in back end requires the use of JDBC. Following are the
steps mainly used when a Java program connects itself to a backed:-
1. Import the package java.sql.
2. Load and register the driver.
3. Establish connection to the database.
Page - 19 -
4. Create a statement.
5. Execute the SQL query and obtain the results.
6. Retrieve the values of the columns of each row.
7. Terminate the connection.
Method used:
1. Class.forName(String ) throws ClassNotFoundException : This method notifies and use
the driver required for accessing the database.Overall there are 127 drivers available. By
default Java use the following driver –“sun.jdbc.odbc.JdbcOdbcDriver”.
6. public boolean next() throws SQLException: This method belongs to the „ResultSet‟ class
and is used to move the cursor to the next record in the resultset. The first record is at row
1.
Page - 20 -
7. public Xxx getXxx(String ) throws SQLException: This method belongs to the
„ResultSet‟ class. Here Xxx may be replaced by the data types present in Java. This
method is used to retrieve the data from the resultset. The parameter takes the name of the
column whose data is to fetched from the resultset.
For example:
import java.sql.*;
class Database
{
public static void main(String [] args)
{
Connection con ;
try
{
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
con = DriverManager.getConnection(“college”);
Statement st = con.createStatement();
St.executeUpdate(“INSERT INTO Details VALUES(„Ajay‟,10));
ResultSet r=st.executeQuery(“Select * from Details”) ;
While(r.next())
{
System.out.println(“Name =”+r.getString(“Name”)+ “ Roll No=”+r.getInt(2));
}
}
catch(ClassNotFoundException e)
{
Page - 21 -
System.out.println(“Cannot File the class”);
}
catch(SQLException f)
{
System.out.println(f.getMessage());
}
finally
{
con.close();
}
}
}
javax.sound.sampled
This package is used to play the recorded sampled sound. Samples are successive snapshots of a
signal. The signal is a sound wave in the case of audio. Plying sound sometimes is referred to as
presentation or rendering. For playing sound there are two kinds of line. A Clip and a
SourceDataLine. Clip specifies all data line at a time for playback whereas SourceDataLine allows
one to keep writing in the buffer while playback. The permitted formats of audio file for sampled
playback are .wav,.auf,.av.
Method Used:
1. public AudioSystem getAudioInputStream(File): This method returns the object of
AudioInputStream class and takes the name of the audio file as an object of File class.This
method is a static method of AudioSyatem class.
Page - 22 -
3. public (Clip) getLine(AudioInputSteream) : This method belongs to the AudioSystem
class and creates a line of the audiofile.
4. public void open(AudioInputSteam): This method belongs to Clip class and is used to
open the audio file for playback.
5. public void start(): This method plays the file and is not stopped until the file is
completed.
6. public void stop(): This method stops the current playing file.
7. public void setMicrosecondPosition(long): This method is used to set the position of head
at the position passed as argument.
For Example:
import javax.sound.sampled.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Playing_Sound
{
private AudioInputStream ain;
private DataLine.Info info;
private File f;
private Clip clip;
Page - 23 -
public Playing_Sound(String name)
{
try
{
f=new File(name);
ain=AudioSystem.getAudioInputStream(f);
info=new DataLine.Info(Clip.class,ain.getFormat());
clip=(Clip) AudioSystem.getLine(info);
clip.open(ain);
System.out.println(ain.getFormat());
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
}
System.out.println(clip.getMicrosecondPosition());
}
catch(Exception r) {}
}
Page - 24 -
{
clip.stop();
}
Player(String name)
{
super(name);
p=new JPanel();
b=new JButton("Play");
s=new JButton("Stop");
b.addActionListener(this);
s.addActionListener(this);
p.add(b);
p.add(s);
add(p);
setBounds(0,0,100,200);
p.setVisible(true);
setVisible(true);
}
Page - 25 -
public void actionPerformed(ActionEvent e)
{
Playing_Sound p=new Playing_Sound("C:\\gh.wav");
if(e.getSource()==b)
{
p.play();
}
else if(e.getSource()==s)
{
p.stop();
}
}
}
class Player_Test
{
public static void main(String [] args)
{
Player o=new Player("My First Player");
}
}
Page - 26 -
The following code shows a simple use of speech synthesis to speak the string "Hello World".
import javax.speech.*;
import javax.speech.synthesis.*;
import java.util.Locale;
// Clean up
synth.deallocate();
} catch (Exception e) {
e.printStackTrace();
}
}
}
This example illustrates the four basic steps which all speech synthesis applications must perform.
Let's examine each step in detail.
Allocate and Resume: The allocate and resume methods prepare the Synthesizer
to produce speech by allocating all required resources and putting it in the RESUMED
state.
Page - 27 -
Generate: The speakPlainText method requests the generation of synthesized
speech from a string.
Deallocate: The waitEngineState method blocks the caller until the Synthesizer
is in the QUEUE_EMPTY state - until it has finished speaking the text. The deallocate
method frees the synthesizer's resources.
The following example shows a simple application that uses speech recognition. For this application
we need to define a grammar of everything the user can say, and we need to write the Java software
that performs the recognition task.
A grammar is provided by an application to a speech recognizer to define the words that a user can
say, and the patterns in which those words can be spoken. In this example, we define a grammar that
allows a user to say "Hello World" or a variant. The grammar is defined using the Java Speech
Grammar Format.
#JSGF V1.0;
grammar <grammar_name>;
public <sentence> = hello world | good morning |
hello mighty computer;
This trivial grammar has a single public rule called "sentence". A rule defines what may be spoken
by a user. A public rule is one that may be activated for recognition.
The following code shows how to create a recognizer, load the grammar, and then wait for the user to
Page - 28 -
say something that matches the grammar. When it gets a match, it deallocates the engine and exits.
import javax.speech.*;
import javax.speech.recognition.*;
import java.io.FileReader;
import java.util.Locale;
Page - 29 -
EngineModeDesc(Locale.ENGLISH));
This example illustrates the basic steps which all speech recognition applications must perform. Let's
examine each step in detail.
Page - 30 -
Create: The Central class of javax.speech package is used to obtain a speech recognizer
by calling the createRecognizer method. The EngineModeDesc argument provides the
information needed to locate an appropriate recognizer. In this example we requested a
recognizer that understands English (since the grammar is written for English).
Allocate: The allocate methods requests that the Recognizer allocate all necessary
resources.
Load and enable grammars: The loadJSGF method reads in a JSGF document from a reader
created for the file that contains the javax.speech.demo grammar. (Alternatively, the
loadJSGF method can load a grammar from a URL.) Next, the grammar is enabled. Once the
recognizer receives focus, an enabled grammar is activated for recognition: that is, the
recognizer compares incoming audio to the active grammars and listens for speech that
matches those grammars.
Attach a ResultListener: The HelloWorld class extends the ResultAdapter class which is a
trivial implementation of the ResultListener interface. An instance of the HelloWorld class
is attached to the Recognizer to receive result events. These events indicate progress as the
recognition of speech takes place. In this implementation, we process the RESULT_ACCEPTED
event, which is provided when the recognizer completes recognition of input speech that
matches an active grammar.
Commit changes: Any changes in grammars and the grammar enabled status needed to be
committed to take effect (that includes creation of a new grammar).
Request focus and resume: For recognition of the grammar to occur, the recognizer must be in
the RESUMED state and must have the speech focus. The requestFocus and resume methods
achieve this.
Process result: Once the main method is completed, the application waits until the user
speaks. When the user speaks something that matches the loaded grammar, the recognizer
Page - 31 -
issues a RESULT_ACCEPTED event to the listener we attached to the recognizer. The source of
this event is a Result object that contains information about what the recognizer heard. The
getBestTokens method returns an array of ResultTokens, each of which represents a single
javax.swing.filechooser
This package is used to hide the system warnings regarding the hard disks used. In our project we are
using floppy drive as or card, so if the floppy drive is not inserted then the system warning will be
flashed. So to hide the message and to make the system to continuously sense the floppy drive we
have to use the above class.
Method Used:
1. public FileSystemView getFileSystemView(): This method is used to find all the
permanent drives present in the system. It is a static method of FileSystemView class and
returns the same class object.
2. public File listRoots(): This method is used to provide an array of File of the drives.
3. public boolean exists(): This method determines whether the disk is present at the
appropriate drive or not.
For Example:
FileSystemView fsv = FileSystemView.getFileSystemView();
File[] f = File.listRoots();
do
{
}while(!f[1].exists());
Page - 32 -
java.util & java.text:
Although there are various classes and methods available in these packages for various jobs but we
have used these packages to extract current date and time.
Method Used:
1. public DateFormat getDateInstance(int,Locale): This method returns the current date and
time of the local system depending upon the Locale and format passed.
2. public String format(Date): This method returns the DateFormat object in a string form
for editing.
class DateTime
{ static:
{
private DateFormat cv=DateFormat.getDateInstance(DateFormat.MEDIUM,new
Locale("en"));
private DateFormat tz=DateFormat.getTimeInstance(DateFormat.SHORT,new
Locale("en"));
private java.util.Date now = new java.util.Date();
private String currentdate,currenttime,at;
currenttime = tz.format(now);
at=cv.format(now);
System.out.println(“Date=”+currentdate);
System.out.println(“Time=”+currenttime);
}
}
Page - 33 -
class Test
{
public static void main(String [] p)
{
DateTime h=new DateTime();
}
}
These three packages are solely used for implementing the front end of our program. The package
javax.swing has been used for designing the components in our code. And the remaining two
packages has been used for handling, registering and listening the events fired while clicking an
button.
Class JButton
Constructor used:
JButton(String text)
Creates a button with text.
Page - 34 -
Methods used:
1. boolean isEnabled():Returns true if button is enabled else returns false
4. void setBounds(int x, int y, int width, int height):Moves and resizes this component. The
new location of the top-left corneris specified by x and y, and the new size is specified
by width and height.
Event used:
Public void actionPerformed(ActionEvent)
The event is fired whenever a button is clicked.
Class TextField
java.lang.Object
java.awt.Component
java.awt.TextComponent
java.awt.TextField
Constructor used:
TextField(int columns)
Constructs a new empty text field with the specified number of columns
Methods used:
1. void setEchoChar(char c):Sets the echo character for this text field
Page - 35 -
2. void setFont(Font):Sets a specified font for text field
3. void setBounds(int x, int y, int width, int height):Moves and resizes this component. The new
location of the top-left corner is specified by x and y, and the new size is specified by width
and height.
5. void setText(String):Sets the text that is presented by this text component to be the specified
text
Event used:
public void textValueChanged(TextEvent)
The event is fired whenever text of a text field is changed.
Class JLabel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
Page - 36 -
Constructor used:
JLabel(String text)
Creates a JLabel instance with the specified text
Methods used:
1. void setFont(Font):Sets a specified font for the Label
2. void setBounds(int x, int y, int width, int height):Moves and resizes this component. The new
location of the top-left corner is specified by x and y, and the new size is specified by width
and height.
3. void setText(String):Sets the text that is presented by this text component to be the specified
text
Class JPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
Constructor used:
JPanel()
Create a new JPanel with a double buffer and a flow layout
Methods used:
1. void setBackground(Color):Sets the background color of this Panel
Page - 37 -
2. Boolean isVisible():Returns true if Panel is visible
Class JFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
Constructor used:
JFrame(String title)
Methods used:
1. void setBounds(int x, int y, int width, int height):Moves and resizes this component. The new
location of the top-left corner is specified by x and y, and the new size is specified by width
and height.
Page - 38 -
For Example:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
JLabel lb1,lb2;
TextField jt;
Myjframe(String str)
{
super(str);
jp1=new JPanel();
jp2=new JPanel();
jb1=new JButton("NEXT");
jb2=new JButton("BACK");
lb1=new JLabel("");
lb2=new JLabel("");
jt=new TextField(20);
jb1.addActionListener(this);
jb2.addActionListener(this);
jp1.add(lb1);
jp1.add(jb1);
jp1.add(jt);
jp2.add(lb2);
jp2.add(jb2);
jp1.setBackground(Color.red);
Page - 39 -
jp2.setBackground(Color.green);
setBounds(0,0,500,500);
add(jp1);
add(jp2);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
Page - 40 -
}
class Test
{
public static void main(String [] args)
{
Myjframe mj=new Myjframe("My swing application");
}}
Layouting: Lay outing can be done in the two ways either by using LayoutManager or without it.
Layouting by using Layout manager: A layout manager is an object that implements the
LayoutManager interface and determines the size and position of the components within a container.
Although components can provide size and alignment hints, a container's layout manager has the
final say on the size and position of the components within the container.
Several AWT and Swing classes provide layout managers for general use:
BorderLayout
BoxLayout
CardLayout
FlowLayout
GridBagLayout
GridLayout
GroupLayout
components in up to five areas: top, bottom, left, right, and center. All extra space is placed in the
center area. Tool bars that are created using JToolBar must be created within a BorderLayout
container, if we want to be able to drag and drop the bars away from their starting positions.
Page - 41 -
BoxLayout: The BoxLayout class puts components in a single row or column. It respects the
components' requested maximum sizes and also lets we align components.
CardLayout: The CardLayout class lets us implement an area that contains different
components at different times. A CardLayout is often controlled by a combo box, with the state
of the combo box determining which panel (group of components) the CardLayout displays.
FlowLayout: FlowLayout is the default layout manager for every JPanel. It simply lays out
components in a single row, starting a new row if its container is not sufficiently wide.
GroupLayout: GroupLayout is a layout manager that was developed for use by GUI builder
tools, but it can also be used manually. GroupLayout works with the horizontal and vertical
layouts separately. The layout is defined for each dimension independently. Consequently,
however, each component needs to be defined twice in the layout. The Find window shown above
is an example of a GroupLayout.
Although it is possible to do without a layout manager, you should use a layout manager if at all
possible. A layout manager makes it easier to adjust to look-and-feel-dependent component
appearances, to different font sizes, to a container's changing size, and to different locales. Layout
managers also can be reused easily by other containers, as well as other programs.
If a container holds components whose size is not affected by the container's size or by font, look-
and-feel, or language changes, then absolute positioning might make sense. Desktop panes, which
contain internal frames are in this category. The size and position of internal frames does not
depend directly on the desktop pane's size. The programmer determines the initial size and
placement of internal frames within the desktop pane, and then the user can move or resize the
Page - 42 -
frames. A layout manager is unnecessary in this situation
Another situation in which absolute positioning might make sense is that of a custom container
that performs size and position calculations that are particular to the container, and perhaps
require knowledge of the container's specialized state.
However, creating containers with absolutely positioned containers can cause problems if the
window containing the container is resized.
For Example:
pane.setLayout(null); //pane is a JPanel object
JButton b1 = new JButton("one");
JButton b2 = new JButton("two");
JButton b3 = new JButton("three");
pane.add(b1);
pane.add(b2);
pane.add(b3);
Page - 43 -
b3.setBounds(150 + insets.left, 15 + insets.top,
size.width + 50, size.height + 20);
Page - 44 -
PRODUCT SPECIFICATION
Page - 45 -
PRODUCT PERSPECTIVES:
The real world ATM is continuously developing day by day. More and more new and exciting
features are incorporated in the machine as per customer‟s increasing needs. In the earlier times ATM
was only recognized for cash withdrawal or balance enquiry. But now a day various new features like
cash deposits, various Bill payments, Mobile recharge etc are added which are attracting more and
more customers. In spite of these advancements in the ATM world, the ATM is not successful in
rural areas. Most of the people are illiterate and even can‟t perform a simple transaction like cash
withdrawal due to language bondation. The same problem exists with the blind people. Providing
more and more language options is useless because they may not be able to read a text written on the
screen. Thus the existing system although growing day by day and fulfilling more and more needs of
customers fails in the case when simplicity and user friendliness is measured.
The proposed system “Speech controlled ATM” provides all the basic as well as advanced features of
a standard real world ATM system. Along with it to add more simplicity and to make the machine
more user friendly concepts like speech synthesis and speech recognition are added.
PRODUCT SCOPE:
Page - 46 -
PRODUCT FUNCTIONS:
The software to be designed will control a simulated Automated Teller Machine (ATM) having a
capablility to read a card, a customer console (keyboard and display) for interaction with the customer
and a printer for printing customer receipts. The simulator must work in a networked environment
(i.e... LAN in our case).It must also communicate with the requisite servers available in LAN. The
simulator software includes also the basic featur es of an ATM viz... Withdrawal, deposit, transaction
details, money transfer and balance queries.
Along with the above features the simulator also demonstrates the additional features like payment of
telephone and electricity bills and other services. The project also helps us to understand the Software
Engineering principles and Object Oriented Programming principles in a better way.
In our project we have pointed out a new idea regarding user friendliness by introducing the concepts
of speech synthesis and speech recognition.
The user can be both rural and urban people and possess the following characteristics:
Rural people are in general illiterate and would like to use the ATM through speech for
simplicity.
Whereas the urban people are literate and can use speech as well as manual techniques.
Rural people want the basic banking features.
Urban people require both banking features and supplementary services.
Page - 47 -
OPERATING ENVIRONMENT:
As we know that the real world ATM machines work in a WAN (Wireless Area network). So it
becomes necessary for our project to work at least in a networked environment. So for this we have
implemented our project in a distributed environment which consists of a server end and multiple
client ends. The software runs on the client end and the request made by the user at the client end
goes for validation at the server end and if it has been validated then the requested transaction is
performed at the server and the appropriate message is displayed at the server.
Although the web based environment can also be used in place of distributed environment, but then
browser was needed to run the program which doesn‟t give a good look and feel, so in order to run
the application with good look and feel we have used distributed environment as our operating
environment.
USER ENVIRONMENT:
As discussed above the software will run in a distributed environment having multiple client ends and
a single server end. So the user will operate on the client end of the distributed environment from
where he will make request and that will be executed on the server end. And the server will respond
the user at client end appropriately.
Simulation is the process of constructing a computerized model of a real world system. And to
construct this system certain assumptions are taken. So do as our project has certain assumptions
which are as follows:
Page - 48 -
Real world ATM machines work in WAN whereas our simulator works in LAN (i.e.
distributed environment).
Unlike real world ATM machines there is no cash dispensing.
For deployment of the software all the client and server ends system must have compatible
JDK versions (i.e. JDK 1.4 onwards).
Instead of touch screens in real world ATM machines our software uses mouse for selection
of options.
Page - 49 -
REQUIREMENT AND SYSTEM ANALYSIS
Page - 50 -
EXTERNAL INTERFACE REQUIREMENTS:
USER INTERFACES:
Select language
through speech
LANGUAGE
SCREEN
Page - 51 -
Prompt to perform transaction TRANASACTION
SCREEN
Select a transaction
TRANSACTION
SCREEN
HARDWARE INREFACES:
Hardware interfaces defines how hardware will be used by the user in the product. As there is no
hardware utility in our project so there is anything such as hardware interfaces.
COMMUNICATION PROTOCOLS:
As defined above the software will work in distributed environment. And in Java distributed
environment can be deployed by three techniques, which are as follows:
Page - 52 -
Among the above three techniques we have used RMI(Remote Method Invocation) which permits
communication between two Java objects, whereas the remaining two permits communication
between Java object and other language object.
If we have to access the remote computer then we have to call the remote method of the remote
object. The object that calls the remote object is called „client object‟. And, the remote object I
known as „server object‟. The system on which the client object runs is known as client and the other
is known as server. So, the communication protocol used in our project can be defined by the
following figure.
CLIENT SERVER
CLIENT STUB STUB SERVER
Return result
Response values
Whenever the client code makes a call to the method of a remote object then the call is made to an
ordinary method in the local proxy called stub. The stub packages the parameters to be passed in the
remote method and performs machine independent coding. The process of encoding of parameter is
called parameter marshaling. Parameter marshaling is done to convert the parameters into a
transmission format. When the receiver at the server side receives the format it un-marshals it and
execute the method at server. The result to be returned is marshaled and transmitted to stub of client
side, where it is un-marshaled and displayed to the client.
Page - 53 -
INFRASTRUCTURE REQUIREMENTS:
HARDWARE REQUIREMENTS:
SERVER SITE:
Processor : Pentium 3 onwards
Hard Disk : 10 GB
RAM : 512 MB
CLIENT SITE:
Processor : Pentium II onwards
Hard Disk : 5 GB
RAM : 256 MB
Good quality headphone and microphone
Floppy Drive Reader
Printer
SOFTWARE REQUIREMENTS:
SERVER SITE:
Operating System : Any Network Operating System (e.g. Windows server 2003)
Front End : Java (JDK 1.4 onwards)
Back End : MS-Access
CLIENT SITE:
Operating System : Compatible Operating System with NOS (e.g. Widows Xp)
Front End : Java (JDK 1.4 onwards)
Page - 54 -
FUNCTIONAL REQUIREMENTS:
1) Entry: The model will service one customer at a time. A customer will be required to
insert a card and enter a personal identification number (PIN) - both of which will be sent
to the bank server for validation as part of each transaction. As soon as the user entry has
been authenticated then a session will be initialized for him/her which will end either
when the user finishes transactions or he/she aborts the session.
2) PIN (Personal Identification Number) Access: If the ATM Simulator determines that the
customer's PIN is invalid, the customer will be required to re-enter the PIN before a
transaction can proceed. If the customer is unable to successfully enter the PIN after three
tries, the card will be locked by the machine, and the customer will have to contact the
bank to unlock it.
3) Transactions: The customer will be able to perform one or more transactions. The ATM
Simulator will communicate each transaction to the bank and obtain verification that it
was allowed by the bank. Ordinarily, a transaction will be considered complete by the
bank once it has been approved. If a transaction fails for any reason other than an invalid
PIN, the ATM will display an explanation of the problem, and will then ask the customer
whether he/she wants to do another transaction. A customer must be able to abort a
transaction in progress anytime instead of responding to a request from the machine.
Transaction Details: These features help the card user to obtain last
Page - 55 -
ten transactions details of the account in a printed way.
Money Transfer: This helps the card user to transfer the money
from his account to another account in the same branch or same
bank.
Deposit: This feature allows the card user to deposit the money in
his/her account.
6) Speech Recognition & Synthesis: The ATM system will now help the user by guiding
him throughout the transaction by giving speech in his or her mother language. This is
known as speech synthesis. And, the ATM system will now be able to recognize spoken
commands. The customer can now give voice commands in his mother language with
the help of a microphone and the ATM machine recognizes those spoken commands and
takes the appropriate action. This is known as Speech recognition.
Page - 56 -
DOMAIN ANALYSIS
Use-case: Withdraw
Actor: User
User selects „withdraw‟ either through speech or manually.
System prompts user to enter the amount.
Page - 57 -
User enters the amount.
System performs & commits the transaction.
System acknowledges user with an updated printed balance details of account.
Use-case: Deposit
Actor: User
User selects „deposit‟ either through speech or manually.
System prompts user to enter the amount.
User enters the amount.
System prompts the user to enter the denominations
System checks the denominations.
System performs & commits the transaction.
System acknowledges user with an updated printed balance details of account
Page - 58 -
Use-case: Mini Statement
Actor: User
User selects „mini statement‟ either through speech or manually.
System displays the last 10 transactions performed on his account in a printed form.
Page - 59 -
STATE CHART DIAGRAM:
Tries<=3
Card
CARD READER invalid
Do: Check Card INTERFACE
Valid PIN entered
Do: Prompt for PIN
Tries>3
LOCKED
valid
Do: Display & Print Acknowledgement Do: Display &Prompt for transaction
TRANSACTION
Acknowledgement message
ACTIVITY DIAGRAMS:
An activity diagram comes under “Scenario based modeling” of analysis modeling. The UML
activity diagram supplements the use-case by providing a graphical representation of the flow of
interaction within a specific scenario. An activity diagram uses rounded rectangles to imply a specific
system function, arrows to represent flow through the system, decision diamonds to depict a
branching decision and solid horizontal lines to indicate that parallel activities are occurring.
Page - 60 -
Enter card
Enter PIN
No. of tries<=3
No. of tries>3
Select a transaction
Acknowledgement/error message
Page - 61 -
SYSTEM DESIGN:
INTRODUCTION:
System Design is generally a collection of principles, concepts and practices that lead to the
development of a high quality system that lead to the development of a high quality product. The
main goal of design engineering is to define a model or representation that can be used to fulfill the
customer about the satisfactory of the constructed software.
In context of a software engineering it is the technical kernel. Once the software requirements are
analyzed and modeled, system design is the last work in modeling phase and it also provide a base
for construction phase.
FUNCTIONALITY:
In single word system engineering implements „quality‟ to our software. It provides a model by
which we can convince our customer for the software to be developed.
Page - 62 -
SEQUENCE DIAGRAM:
Enter card
invalid
status
status
Page - 63 -
USER ATM SCREEN SYSTEM DATABASE
Updating of data
User session ends
Page - 64 -
CLASS DIAGRAMS:
Myjframe
JPanel
JButton
JLabel
TextField
Playing_Sound Font
Int
AudioInputStream DateTime
Is placed within &
DataLine Playing_Sound
Is part of Long
File
Clip String
Is placed within & PrintPanel
+Playing_Sound (String) Is part of PrintRequestAttributes
+Play () +Myjframe (String)
+Stop () +senseCard()
+textValueChanged(TextEvent)
+actionPerformed(ActionEvent)
+userTalked(String)
DateTime
+startThread ()
DateFormat
Date
String
Is used to build
+Datetime () AtmSimulatorFloppy
+getDate ()
+main (String [ ])
+getTime ()
Page - 65 -
USER INTERFACE DESIGN
Page - 66 -
INTRODUCTION:
User Interface Design means the interface through which user can interact with the software and
perform it requisite operations. This interface must user friendly as much as possible. It must not
force unnecessary stress on the end user and must be easy to use. The interface must also fulfill the
requirements that had been stated at the requirement elicitation and requirement inception phase.
The user interface can be defined by the following snapshots of the user interface of our project. It
defines how a user can interact efficiently with the software.
Page - 67 -
1) The above interface defines the “Welcome Screen of our project”. The software
remains in the screen until the user doesn‟t insert the card (i.e. floppy drive). As soon as the
user enters the card properly the next screen is displayed.
Page - 68 -
2) This screen prompts the user to register by providing their personal details. It can be done by
either clicking on the respective fields and buttons or by speaking their choices. After
entering the required information and confirming the registration, the next screen is
displayed..
Page - 69 -
3) This screen prompts the user to provide their personal details. It can be done by either
clicking on the respective fields and buttons or by speaking their choices. After entering the
required personal details and confirming the information, the next screen is displayed.
Page - 70 -
4) This screen requests the user to enter their account details. This can be accomplished by either
clicking on the appropriate fields and buttons or by speaking their selections. Once the
necessary account details are entered and verified, the subsequent screen will be displayed.
Page - 71 -
5) This screen prompts the user to select their desired banking transaction. Options available include
Deposit, Withdrawal, Fast Cash, Mini Statement, PIN Change, Balance Enquiry, and Exit. Users can
easily make a selection by clicking on the corresponding buttons or by using voice commands. Once a
transaction type is chosen, the system will guide the user through the necessary steps to complete their
transaction efficiently and securely. Whether depositing funds, withdrawing cash, quickly accessing a
set amount with Fast Cash, viewing recent transactions with a Mini Statement, changing their PIN for
security, checking their account balance, or exiting the system, users can navigate the options with
ease..
Page - 72 -
6) When the user clicks on the Deposit option, they are prompted to enter the deposit amount,
either by typing it or using voice commands. After confirming the amount, the user is
instructed to insert cash or checks as appropriate. Once the transaction is processed, a
confirmation message is displayed, and the user can choose to print a receipt, make another
transaction, or return to the main menu.
Page - 73 -
7) When the user selects the Withdraw option, they are guided through the withdrawal process.
The user starts by entering the amount they wish to withdraw, either by typing it directly or
using voice commands. After confirming the withdrawal amount, the user is prompted to
choose the denominations for cash withdrawal if applicable. Once the transaction details are
confirmed, the user follows the instructions to receive the cash from the ATM or bank teller.
A confirmation message is displayed upon successful withdrawal, offering options to print a
receipt, conduct another transaction, or return to the main menu.
Page - 74 -
8) When the user selects the Mini Statement option, they are presented with a summary of their
recent transactions. The screen displays details such as transaction dates, descriptions, and
amounts for the latest transactions performed on their account. Users can scroll through the
list to view additional transactions or filter results based on specific criteria like date range or
transaction type. The Mini Statement provides a quick snapshot of account activity, helping
users monitor their finances conveniently. After reviewing their transactions, users can choose
to print the statement, perform another transaction, or return to the main menu.
Page - 75 -
9) When the user selects the PIN Change option, they are guided through the process of updating
their Personal Identification Number (PIN). The screen prompts the user to enter their current
PIN followed by their desired new PIN, ensuring security through encrypted input. After
confirming the new PIN, the system processes the change and displays a confirmation
message. Users are advised to memorize their new PIN and avoid sharing it with anyone to
maintain account security. They can then proceed to perform additional transactions, print a
receipt, or return to the main menu.
Page - 76 -
10) Selecting the Balance Enquiry option provides users with an instant view of their current
account balance. This screen displays detailed information including available funds, recent
transactions, and pending withdrawals, allowing users to quickly assess their financial status.
After reviewing their balance, users have the option to print a statement, proceed with another
transaction, or return to the main menu for further banking activities.
Page - 77 -
11) Choosing the Fast Cash option allows users to quickly withdraw a predefined amount of cash
from their account. Users select from predetermined withdrawal amounts such as $20, $50, or
$100, providing a convenient and efficient way to access cash without needing to specify an
exact amount. After selecting the desired amount, the system processes the transaction, and
users receive their cash promptly. A confirmation message is displayed, offering options to
print a receipt, perform another transaction, or return to the main menu.
Page - 78 -
12) After successfully completing the deposit transaction, users receive a confirmation message
indicating that the deposit has been processed. They have the option to print a receipt for their
records. Additionally, users can choose to perform another transaction or return to the main
menu to continue managing their accounts. The deposited funds will be reflected in their
account balance, ensuring they have accurate and up-to-date financial information for future
transactions and planning.
Page - 79 -
13) Upon successfully completing the withdrawal transaction, users receive a confirmation
message indicating that the requested amount has been dispensed. They have the option to
print a receipt for their records. Users can then choose to perform another transaction or
return to the main menu to manage their accounts further. The withdrawal amount will be
deducted from their account balance, ensuring accurate and up-to-date financial information
for future transactions and planning.
Page - 80 -
DATABASE SAMPLES IMAGES
Page - 81 -
Page - 82 -
Page - 83 -
IMPLEMENTATION
Page - 84 -
INTRODUCTION:
The implementation phase of software development is concerned with design specification with
source code. The primary goal of implementation is to write source code to its specification. The
code has to be easily verified, so that debugging, testing and maintenance can be eased. The goal can
be achieved by making the source code as clear and straightforward as possible.
DEVELOPMENT ENVIRONMENT:
Regarding the development environment of our project, it has two phases – first on a stand alone
system and second on a peer-to-peer network (containing two computers). Initially we have
developed the front end of the software in modules. Then we have designed the back end (i.e.
databases and its access through Java) or we can also say server end. Then for checking the
functioning in the distributed network we have deployed the software in network discussed above,
with one system as client and other system as server.
PROTOTYPING:
RAPID PROTOTYPING:
The RAD Model is an incremental process model with a rapid development phase. It is a high speed
adaptation of waterfall model. The rapid development is achieved by component based construction
process. If the software requirement is well defined and project scope is constrained then RAD model
can develop the project in a short time duration (i.e. 60 to 90 days).
Page - 85 -
Team n
(Modeling)
Team n
(Construct)
Team 2
(Modeling)
Communi- Planning
cation Team2 Deployment
(Construct)
Team 1
(Modeling)
Team 1
(Construct)
INCREMENTAL PROTOTYPING:
It combines waterfall model in an iterative fashion. It uses the linear sequences in staggered form.
Each increment adds some additional functionality to software. For example consider word
processing software developed using this paradigm. Initially in the first increment only basic file
management, editing and documentation will be provided. At second increment sophisticated file
management, documentation and editing features will be available. At third increment spell check
feature will be added and so on.
Thus the first increment in an incremental model is often the core product. The core product refers to
the basic functionality and the supplementary functionality are provided at the later versions. The
core product is used by the customer. As result of used plan for next increment is produced. The next
increment must increase the functionality of the core product. This process continues till the complete
software is not provided.
Page - 86 -
Functionality
C P M K D
Increment n
C P M K D Increment 2
C P M K D Increment 1
Time
Fig: Incremental Prototyping
EVOLUTIONARY PROTOTYPING:
As we know that software occupies time. If during the development of software the business or
product requirement changes, then it leads to the development of software to be unrealistic. Also the
tight deadlines prevent the completion of comprehensive project. In such cases, only a limited version
product can be provided. To overcome the problem, we require a software process model, which can
accommodate a product explicitly and can modify itself with the product with the time. It is of two
types:
Prototyping Model:
Often a customer defines the objective of software, but is unable to define the complete
details about input, processing and output. In such cases a prototype model is beneficial as
it guides the developer and the customer when the requirement is indistinct.
Page - 87 -
Communication
Spiral Model:
A spiral model is an evolutionary process model that couples the iterative nature of
prototype model and semantic and control aspect of waterfall model. It produces the rapid
development of increment of the software. So we can say that spiral model results in
development of software in evolutionary releases. The first release may be prototype and
further release is a sophisticated software product.
PORTABILTY:
Platform for any software is defined as the combination of processor and operating system over
which the software runs. Platform dependent software is those that will run only on that platform for
which it has been constructed. For example if we construct a program in C language which is
running on a platform (Intel + Windows Xp) and if we run the same program on a computer having
LINUX operating system then the program will not run. So C doesn‟t support portability.
A platform is the hardware or software environment in which a program runs. The Java platform
differs from most other platforms in that it's a software-only platform that runs on top of other,
hardware-based platforms. Most other platforms are described as a combination of hardware and
operating system.
Page - 88 -
The Java platform has two components:
The Java API is a large collection of ready-made software components that provide many useful
capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped into libraries
(packages) of related components. The following figure depicts a Java program, such as an
application or applet, that's running on the Java platform. As the figure shows, the Java API and
Virtual Machine insulates the Java program from hardware dependencies.
As a platform-independent environment, Java can be a bit slower than native code. However, smart
compilers, well-tuned interpreters, and just-in-time byte code compilers can bring Java's
performance close to that of native code without threatening portability.
Regarding our project, it is portable. The reason for portability is the technology used i.e. JAVA. Java
itself is a portable language (supports platform independency). In the project first Java will create a
byte code (CLASS file) of our source code and after that this byte code can be made to execute on
any system irrespective of the platform. The only thing that can violate the portability of our project
is –if the version of JDK is less than 1.4.
Page - 89 -
SOURCE CODE
Sign up page 1
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import com.toedter.calendar.JDateChooser;
import java.awt.event.*;
//import java.util.regex.Matcher;
//import java.util.regex.Pattern;
long random;
JButton next;
JRadioButton male,female,other,married,unmarried;
JDateChooser dateChooser;
SignupOne()
{
setLayout(null);
Random ran = new Random();
random = Math.abs((ran.nextLong() % 9000L) + 1000L);//Math.abs(...): This
function returns the absolute value of a given number. It ensures that the result is a non-
negative value.
//ran.nextLong(): This generates a random long value using an instance of the Random
class named ran.
Page - 90 -
//% 9000L: The modulus operator % is used to find the remainder when dividing the
generated random long value by 9000. This effectively limits the range of the generated
number to values between 0 (inclusive) and 8999 (inclusive).
//+ 1000L: After taking the modulus, 1000 is added to the result. This shifts the range of
the generated number to be between 1000 (inclusive) and 9999 (inclusive).
//So, the entire line of code generates a random number in the range of 1000 to 9999.
Page - 92 -
JLabel marital =new JLabel("Marital Status:");
marital.setFont(new Font("Railay", Font.BOLD,20));
marital.setBounds(100, 390, 200, 30);
add(marital);
}
public void actionPerformed (ActionEvent ae){
String formno = "" + random;//long
String name =nameTextField.getText();
String fname =fnameTextField.getText();
String dob = ((JTextField)
dateChooser.getDateEditor().getUiComponent()).getText();
//for get date a class in datechooser .getDataEditor and in getEditor we have
.getUiComponent
String gender = null;
if(male.isSelected())
{
gender = "Male";
}else if(female.isSelected()){//isSelected for check and compair
gender = "Female";
}
if (married.isSelected()){
marital = "Married";
}
else if(unmarried.isSelected()){
marital ="Unmarried";
}
else if(other.isSelected()){
marital ="Other";
Page - 95 -
}
String address = addressTextField.getText();
String city = cityTextField.getText();
String state = stateTextField.getText();
String pincode = pincodeTextField.getText();
try{
if(name.equals("")){
else if(fname.equals("")){
JOptionPane.showMessageDialog(null,"Father's Name Is Required");//use for
validate and show massaag
}
else if(dob.equals("")){
else if(gender.equals("")){
JOptionPane.showMessageDialog(null,"Gender Is Required");//use for
validate and show massaage
}
else if(marital.equals("")){
}
else if(address.equals("")){
else if(city.equals("")){
JOptionPane.showMessageDialog(null,"City Is Required");
else if(state.equals("")){
JOptionPane.showMessageDialog(null,"State Is Required");
}
else if(pincode.equals("")){
}
else{
Conn c = new Conn();
String query = "insert into signup
values('"+formno+"','"+name+"','"+fname+"','"+dob+"','"+gender+"','"+email+"','"+marita
l+"','"+address+"','"+city+"','"+state+"','"+pincode+"')";
c.s.executeUpdate(query);
setVisible(false);
new SignupTwo(formno).setVisible(true);//we pass here form no to sent in
signup two the same form no for enter relete the user data is a same user
}
}
catch (Exception e){
Page - 97 -
System.out.println(e);
}
}
public static void main(String args[])
{
new SignupOne();
}
}
Sign up page 2
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import com.toedter.calendar.JDateChooser;
import java.awt.event.*;
JComboBox religion,category,occupation,education,income;
JTextField pan,aadhar;
JRadioButton syes,sno,eyes,eno;
ButtonGroup sgroup,egroup;
JButton next;
String formno;
Page - 98 -
SignupTwo(String formno)// this is a constructor to get form no
{
this.formno = formno; // we take form no here
setLayout(null);
Page - 100 -
JLabel panNumber =new JLabel("PAN Number:");
panNumber .setFont(new Font("Railay", Font.BOLD,20));
panNumber .setBounds(100, 420, 200, 30);
add(panNumber );
sno=new JRadioButton("No");
sno.setBounds(450, 540, 100, 30);
sno.setBackground(Color.white);
add(sno);
Page - 101 -
JLabel exisitingAccount =new JLabel("Exisiting Account:");
exisitingAccount.setFont(new Font("Raleway", Font.BOLD,20));
exisitingAccount.setBounds(100, 600, 200, 30);
add(exisitingAccount);
setSize(850,800);
setLocation(350,10);
Page - 102 -
setVisible(true);
}
public void actionPerformed (ActionEvent ae){
if(syes.isSelected()){
seniorcitizen = "Yes";
}else if(sno.isSelected()){
seniorcitizen = "No";
}
if(eyes.isSelected()){
exisitingaccount= "Yes";
}else if (eno.isSelected()){
exisitingaccount = "No";
}
try{
Page - 103 -
Conn c = new Conn();
String query = "insert into signuptwo
values('"+formno+"','"+sreligion+"','"+scategory+"','"+sincome+"','"+seducation+"','"+soc
cupation+"','"+span+"','"+saadhar+"','"+seniorcitizen+"','"+exisitingaccount+"')";
c.s.executeUpdate(query);
//signupThree object
setVisible(false);
new SignupThree(formno).setVisible(true);
}
catch (Exception e){
System.out.println(e);
}
}
public static void main(String args[])
{
new SignupTwo("");//we pass here empaty string because we dont have any default
constructor here
}
}
Sign up page 3
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
JRadioButton r1,r2,r3,r4;
Page - 104 -
JCheckBox c1,c2,c3,c4,c5,c6,c7;
JButton submit, cancel;
String formno;
this.formno = formno;
setLayout(null);
c6 = new JCheckBox("E-Ststement");
c6.setBounds(350,550,200,30);
c6.setBackground(Color.WHITE);
Page - 107 -
c6.setFont(new Font("Raleway",Font.BOLD,16));
add(c6);
c7 = new JCheckBox("I hereby declares that the above entered details are correct to the
best of my knowledge");
c7.setBounds(100,600,600,30);
c7.setBackground(Color.WHITE);
c7.setFont(new Font("Raleway",Font.BOLD,12));
add(c7);
getContentPane().setBackground(Color.WHITE);
setSize(800,750);
setLocation(350, 0);
setVisible(true);
}
public void actionPerformed(ActionEvent ae){// function overwriting
if(ae.getSource() == submit) {
if(r1.isSelected()){
Page - 108 -
accountType = "Saving Account";
}
else if(r2.isSelected()){
accountType = "Fixed Deposit Account";
}
else if(r3.isSelected()){
if(c1.isSelected()){
try{
if (accountType.equals(""))
{
JOptionPane.showMessageDialog(null, "Account Type Is Required");
}else{
Conn conn = new Conn();
String query1 = "insert into signupthree
values('"+formno+"','"+accountType+"','"+cardnumber+"','"+pinnumber+"','"+facility+"')
";
String query2 = "insert into login
values('"+formno+"','"+cardnumber+"','"+pinnumber+"')";
conn.s.executeUpdate(query1);
conn.s.executeUpdate(query2);
}
setVisible(false);
new Deposit(pinnumber).setVisible(false);//we use the code for Deposite money
setVisible(false);
new Login().setVisible(true);
}
Login page
package bank.management.system;
import javax.swing.*; //java extend package javax.swing import this package for use JFrame
setLayout(null);// because jframe by default use border Layout so if we use costome Layout we
write this code
ImageIcon i3 = new ImageIcon(i2);//to convert image icon into a image beacuse we can not put a
image icon in a Jlable directly
Page - 111 -
JLabel label = new JLabel(i3);//for put the image in JFrame;
add(text);
login.addActionListener(this);
add(login);
Page - 112 -
clear = new JButton("CLEAR");
clear.setBounds(430,300,100,30);
clear.setBackground(Color.BLACK);// use for background color
clear.setForeground(Color.WHITE);// use for upper color which is upper on background color
signup.addActionListener(this);
add(signup);
setSize(800,480);//this a code for create a frame 480 is hight and 800 is width of a frame
setVisible(true);//because the frame is by default hidden so we use the code for seen the frame
setLocation(350,200);//we use the setLocation for giving the title of the frame by default the frame
location is top left
}
public void actionPerformed(ActionEvent ae){//use for overWrite the action function and perform
action
if(ae.getSource()== clear){
cardTextField.setText("");
pinTextField.setText("");
try{
ResultSet rs = conn.s.executeQuery(query);
if(rs.next()){
setVisible(false);
new Transactions(pinnumber).setVisible(true);
}else
{
JOptionPane.showMessageDialog(null, "Incorrect Card Number Or Pin");
}
}catch(Exception e){
System.out.println(e);
}
}
public static void main(String args[]){
new Login();// this is a class object when we create a object than first constructore are called with
same class name
}
}
Transactions page
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
Page - 114 -
public class Transactions extends JFrame implements ActionListener {
JButton deposit,withdrawl,fastcash,ministatement,pinchange,balanceenquiry,exit;
String pinnumber;
Transactions(String pinnumber)
{
this.pinnumber = pinnumber;
setLayout (null);
setSize(750,750);
setLocation(300,0);
setUndecorated(true);
setVisible(true);
if (ae.getSource() == exit){
System.exit(0);
setVisible(false);
new Withdrawl (pinnumber).setVisible(true);
setVisible(false);
new FastCash(pinnumber).setVisible(true);
new MiniStatement(pinnumber).setVisible(true);
}
}
public static void main(String args[]){
new Transactions("");
}
}
Deposit page
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
JTextField amount;
JButton deposit,back;
String pinnumber;
this.pinnumber = pinnumber;
Page - 117 -
setLayout(null);
setSize(750,750);
setLocation(350,0);
setUndecorated(true);
setVisible(true);
}
else {
try{
Conn conn = new Conn();
setVisible(false);
new Transactions(pinnumber).setVisible(true);// if we press back button than we go back
transaction class with pin;
Page - 119 -
Withdrawal page
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
JTextField amount;
JButton withdraw,back;
String pinnumber;
this.pinnumber = pinnumber;
setLayout(null);
Page - 120 -
back = new JButton("Back");
back.setBounds(315,435,120,27);
back.addActionListener(this);
image.add(back);
setSize(750,750);
setLocation(350,0);
setUndecorated(true);
setVisible(true);
}
else {
try{
Conn conn = new Conn();
Page - 121 -
}if (ae.getSource() == back){
setVisible(false);
new Transactions(pinnumber).setVisible(true);// if we press back button than we go back
transaction class with pin;
Balance enquiry
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
BalanceEnquiry(String pinnumber){
this.pinnumber = pinnumber;
setLayout(null);
Page - 122 -
back.setBounds(340,430,95,30);
back.addActionListener(this);
image.add(back);
while(rs.next()){
if(rs.getString("type").equals("Deposit")){
}else{
balance -= Integer.parseInt(rs.getString("amount"));// knoe this line
}
}
}catch (Exception e){
System.out.println(e);
}
setSize(750,750);
setLocation(300,0);
setUndecorated(true);
setVisible(true);
}
}
public static void main(String args[]){
Page - 123 -
new BalanceEnquiry("");
}
}
Fast cash
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Date;
import java.sql.*;
JButton r1,r2,r3,r4,r5,r6,back;
String pinnumber;
FastCash(String pinnumber)
{
this.pinnumber = pinnumber;
setLayout (null);
setSize(750,750);
setLocation(300,0);
setUndecorated(true);
setVisible(true);
if (ae.getSource() == back){
setVisible(false);
new Transactions(pinnumber).setVisible(true);
Page - 125 -
}else {
String amount = ((JButton)ae.getSource()).getText().substring(3);//ae.getSource we use to get
value its always return a object so we use JButton
// and substring use to remove the sub string wors like RS 500 so we remove RS and Space use 3
try{
ResultSet rs = c.s.executeQuery ("select * from bank where pinnumber = '"+pinnumber+"'") ;//
in this query we get all information wich i connect with pinnumber
int balance = 0;
while(rs.next()){
if(rs.getString("type").equals("Deposit")){
}else{
balance -= Integer.parseInt(rs.getString("amount"));// knoe this line
}
}
if(ae.getSource() != back && balance < Integer.parseInt(amount)){
setVisible(false);
new Transactions(pinnumber).setVisible(true);
}catch(Exception e){
System.out.println(e);
}
}
Page - 126 -
}
public static void main(String args[]){
new FastCash("");
}
}
PIN change
package bank.management.system;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
JPasswordField pin,repin;
JButton change, back;
String pinnumber;
PinChange(String pinnumber){
this.pinnumber = pinnumber;
setLayout(null) ;
Page - 127 -
image.add(text);
setSize(750,750);
setLocation(300,0);
setUndecorated(true);
setVisible(true);
}
public void actionPerformed(ActionEvent ae){
if (ae.getSource()== change){
Page - 128 -
try{
String npin = pin.getText();
String rpin = repin.getText();
if(!npin.equals(rpin)){
JOptionPane.showMessageDialog(null, "Entered PIN does not match");
return;
}
if(npin.equals("")){
JOptionPane.showMessageDialog(null, "Please Enter New PIN ");
return;
}
if(rpin.equals("")){
JOptionPane.showMessageDialog(null, "Please Re-Enter New PIN ");
return;
}
conn.s.executeUpdate(query1);
conn.s.executeUpdate(query2);
conn.s.executeUpdate(query3);
setVisible(false);
new Transactions(rpin).setVisible(true);//we pass here new pin because pin is updated
}catch (Exception e){
System.out.println(e);
}
}else{
setVisible(false);
new Transactions(pinnumber).setVisible(true);
}
Page - 129 -
public static void main(String args[])
{
new PinChange("").setVisible(true);
}
Mini statement
package bank.management.system;
import java.awt.*;
import javax.swing.*;
import java.sql.*;
MiniStatement(String pinnumber){
setTitle("Mini Statement");
setLayout(null);
try{
Conn conn = new Conn();
ResultSet rs = conn.s.executeQuery("select * from login where pinnumber = '"+pinnumber+"'");
Page - 130 -
while(rs.next()){
card.setText("Card Number: " + rs.getString("cardnumber").substring(0,4)+( "XXXXXXXX") +
rs.getString("cardnumber").substring(12));
}
}catch(Exception e){
System.out.println(e);
}
try{
Conn conn = new Conn();
int balance1 = 0;
ResultSet rs = conn.s.executeQuery("select * from bank where pinnumber = '"+pinnumber+"'");
while(rs.next())
{
mini.setText(mini.getText() + "<html>" + rs.getString("date")+
" "
+ rs.getString("type") +
" " + rs.getString("amount") +
"<br><br><html>");
if(rs.getString("type").equals("Deposit")){
}else{
balance1 -= Integer.parseInt(rs.getString("amount"));// knoe this line
}
}
}catch(Exception e){
System.out.println(e);
}
setSize(400,600);
Page - 131 -
setLocation(20,20);
getContentPane().setBackground(Color.WHITE);
setUndecorated(true);
setVisible(true);
Page - 132 -
TESTING
Page - 133 -
TESTING STRATEGIES:
UNIT TESTING:
Unit Testing is a testing mechanism that tests the modules of our software. It can be carried out after
the coding or before the coding. A component level design act as guide for testing of modules. The
unit testing tests the control paths to uncover errors within the boundaries of modules. The unit
testing mainly focuses on the internal processing level and data structure of a component. Testing of
each module can be carried out in the following parts:
Module Interface
Local data structure
Independent paths
Boundary values
Error handling statements
Interface
Local Data Structures
Module
Independent Paths
Boundary Values
Error Handling
Test Cases
Page - 134 -
integrity. After that all independent paths are checked whether they are checked at least once. After
this the boundary values are checked against the control flow, data structures at the boundaries of
input domain. At last the tests are conducted for the error handling statements for identifying any
errors (if present) and error handling routines.
INTEGRATION TESTING:
Integration testing is a systematic technique that describes software architecture and at the same time
checks the errors encountered in the interfaces. The main objective of integration testing is to use the
unit tested modules and design architecture as depicted by design.
The normal tendency is to follow non-incremental integration testing. In which all the components
are combined and structure is obtained and afterwards testing is performed. But the best way is to
follow incremental testing in which the program is constructed and tested increments and errors can
be easily isolated and corrected. There are two types of incremental testing:
Top-down incremental testing is a mechanism for constructing software architecture and testing at
the same time. In this approach the process of integration begins from the top where the main control
is taken first. Then as we move towards bottom each module is integrated and simultaneously tested.
The main control module act as a driver and the module sub-ordinate requires are replaced by stubs.
Depth first integration and Breadth first integration are two approaches for integration of modules.
Page - 135 -
Bottom-up Integration Testing:
In bottom-up integration the integration of module begins from the lowest level. Since the module at
the lowest level are already integrated and tested, so stubs are eliminated.
FUNCTION TESTING:
Black Box testing or Functional testing is a mechanism to check the functionality of our program. By
applying black box testing tester will be able to get a test case that checks the functionality of ones
program.
Black Box testing is done to check that software functions are operational i.e. input is properly
accepted & output is correctly produced & the integrity of the external information is maintained. It
is usually applied at the later phase of testing. It can be performed by following four methods:
Page - 136 -
SYSTEM TESTING:
System testing is actually a series of different tests whose primary purpose is to fully exercise the
computer based system. Through this it is checked whether all system elements have been properly
integrated and perform allocated functions. It includes the following testing:
Recovery Testing: If there is a system fault then the system must resume processing
within a certain period of time. So it allows a tester to cause faults in various cases and
look for the resume duration.
Security Testing: It tests whether the security measures possessed by our software is
capable of stopping the illegal access.
Stress Testing: Stress testing checks the stress that can be beard by our software. For this
the tester runs the software with abnormal quantity, frequency and volume of resources.
Performance Testing: Performance testing is usually done to check the performance of
program at run time. For this hardware and software instrumentation is needed.
TESTING CONSIDERED:
Initially we have tested the unit modules. And within each module we have performed black box
testing to check whether the modules is accepting the input(zero or many) or not and against that
input it is producing correct output or not. If it is producing the output but it is logically wrong then
white box testing is performed to check the internal functionality of modules i.e. the logical control
flows and details.
Page - 137 -
After performing unit testing on all modules we integrate them to form big modules. Here we have
used incremental bottom-up integration testing. In this we have integrated the modules starting from
bottom and the cluster is tested. At the final step the entire system is tested.
Page - 138 -
FUTURE WORK
Page - 139 -
The future work that can be done in the project are as follows:
Page - 140 -
CONCLUSION
Page - 141 -
As a matter of fact this project is completed in twelve months and this duration is divided into two
sections, six months of collecting information, planning and literature survey and next six months of
implementing it. First, the theoretical section where I have learned lots of things regarding ATM
machines (e.g.…functioning features and services provided), regarding simulation, simulators and
needs of simulation. Along with these we have also learned some concepts of RMI (Remote Method
Invocation) and JDBC (Java Database Connectivity) in Java. Having an ATM Simulator as a major
project helps me to better understand the concepts of Object Oriented Programming principles,
Software Engineering principles and concepts regarding simulation and modeling.
In this duration I have tried to plan the simulator in such a manner that it not only covers all the
features and facilities of modern real ATM but an enhancement is also suggested. This simulator
also provides the environment in which new enhancements can be performed on it, before they are
equipped on the real world ATM machines. The use of speech synthesis and speech recognition
helps the software more user friendly. The speech synthesis guides the user for performing the
transactions and speech recognition facilitates the user to perform the transaction through speech.
This speech mechanism thus helps the rural people to use the ATM without extra overhead of
remembering the procedure for maintaining the transactions. As speech synthesis will guide them
and speech recognition will allow them to use their speech to perform transactions.
And in these six months we have implemented the software in such a way that it fulfils all the
objectives that had been stated in the first six months. Also we have performed the different testing
strategies.
Page - 142 -
REFERENCES
Page - 143 -
BOOKS REFFERED:
WEBSITE REFFERED:
www.cloudgarden.com
www.google.com
www.java.sun.com
Page - 144 -
Page - 145 -
Page - 146 -