Sie sind auf Seite 1von 52

CONTENTS

S No.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.

Topic
Acknowledgement
Requirements
Introduction
Financial Networks
Purpose
Uses
Java Language
History of Java
UML Diagrams
Project Code
Screenshots

Page
No.
2
3
6
8
9
10
12
17
20
25
49

Acknowledgment
We hereby take this opportunity to thank all those people whose
knowledge and experience helped me bring this report in its
present form. It would have been a tough task for me to complete
report without their help.
We express my sincere thanks and gratitude to our tutor
_______________________________________ for providing me the
opportunity to pursue my training at the institute.
1|Page

We would like to express my gratitude to my group member,


________ for helping me in every aspect during the training phase
as well as in carrying out the whole project.
Finally, we would like to express my deep appreciation to my
family and friends who have been a constant source of
inspiration. We are internally grateful to them for always
encouraging me wherever and whenever I needed them.

REQUIREMENTS
2|Page

REQUIREMENTS

2.1 Hard ware Specification

Processor

Intel Pentium3

RAM

512MB

Hard disk

2GB

Java

2.2 Software Requirements

Front end
3|Page

Back end

SQL Server 2005

Operating System

Windows 98/XP

PROJECT DETAILS

4|Page

INTRODUCTION
In The Automated Teller Machine ATM Banking
System is a banking application developed to perform different
banking services through the Automated Teller Machines. The all
functions include the regular transactions like cash deposits, cash
withdrawals, balance enquiry, balance statements, savings
account, and current account; change PIN Number, Credit card
Withdrawals and so on. The application design maintains the
information of the accounts of various customers including the
information of the ATM cards, their types Credit cards, Debit Cards
and the transactions done by the customers through the ATM
machine centers with co-relation of the Banking Services.
An automated teller machine or automatic teller machine (ATM,
American, Australian, Singaporean, Indian, and Hiberno-English),
also known as an automated banking machine (ABM, Canadian
English), cash machine, cashpoint, cashline, or colloquially hole in
the wall (Australian, British, South African, and Sri Lankan
English), is an electronic telecommunications device that enables
the customers of a financial institution to perform financial
transactions without the need for a human cashier, 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 smart card
with a chip that contains a unique card number and some security
information such as an expiration date or CVVC (CVV).
Authentication is provided by the customer entering a personal
identification number (PIN).
5|Page

Using an ATM, customers can access their bank deposit or credit


accounts in order to make a variety of transactions such as cash
withdrawals, check balances, or credit mobile phones. If the
currency being withdrawn from the ATM is different from that in
which the bank account is denominated the money will be
converted at an official exchange rate. Thus, ATMs often provide
the best possible exchange rates for foreign travellers, and are
widely used for this purpose
The stored details also include the information of the various
centers in and around the ATM services, which help in the
relational maintenance of every transaction in the ATM Machine
by the customers with their concerned branch operations.

6|Page

Financial networks
Most ATMs are connected to interbank networks, enabling people
to withdraw and deposit money from machines not belonging to the bank where
they have their accounts or in the countries where their accounts are held (enabling
cash withdrawals in local currency). Some examples of interbank networks include
NYCE, PULSE, PLUS, Cirrus, AFFN, Interac, Interswitch, STAR, LINK,
MegaLink and BancNet.
ATMs rely on authorisation of a financial transaction by the card issuer or other
authorising institution via the communications network. This is often performed
through an ISO 8583 messaging system.
Many banks charge ATM usage fees. In some cases, these fees are charged solely
to users who are not customers of the bank where the ATM is installed; in other
cases, they apply to all users.
In order to allow a more diverse range of devices to attach to their networks, some
interbank networks have passed rules expanding the definition of an ATM to be a
terminal that either has the vault within its footprint or utilises the vault or cash
drawer within the merchant establishment, which allows for the use of a scrip cash
dispenser.
ATMs typically connect directly to their host or ATM Controller via either ADSL
or dial-up modem over a telephone line or directly via a leased line. Leased lines
are preferable to plain old telephone service (POTS) lines because they require less
time to establish a connection. Less-trafficked machines will usually rely on a dialup modem on a POTS line rather than using a leased line, since a leased line may
be comparatively more expensive to operate versus a POTS line. That dilemma
may be solved as high-speed Internet VPN connections become more ubiquitous.
Common lower-level layer communication protocols used by ATMs to
7|Page

communicate back to the bank include SNA over SDLC, TC500 over Async, X.25,
and TCP/IP over Ethernet.

Purpose
The developed application is considered to the version upon the
system, which is proposed to be built with the content and touch
of the oracle as the centralize database with oracle 9i as the
database. The overall banking ATM system is planned to be is the
format of distributed architecture as the database platform. The
proposals are planed to keep entire architecture to be browser (IE,
Mozilla, Chrome) specific.

The major functions of the overall ATM system are to keep the
following component intact.
Consistency of the ATM System
Integrity of the ATM System
Data Security for all customers
Data Reliability, Unique and Accuracy
User Friendly web pages at admin side and User side
To check that the banking ATM system overcome the hurdles
of the version specific standards

About the Functionalities:


8|Page

The application will enable visitors to perform activities such as banking


and others.

Banking applications contains following Accounts such as Checking


Accounts, Savings Account, and Fixed Deposits & Recurring Deposits.

The application will enable a registered user for Registration


Information for Account Holders.

The application will have an administrators page, which will enable


administrators to maintain user details and manage the accounts in the
money banks inc.

The application will allow account holders to display Transaction in


Details including Balance Amount.

Uses
Two NCR Personas 84 ATMs at a bank in Jersey dispensing
two types of pound sterling banknotes: Bank of England on
the left, and States of Jersey on the right
Although ATMs were originally developed as just cash
dispensers, they have evolved to include many other bankrelated functions:
Paying routine bills, fees, and taxes (utilities, phone bills,
social security, legal fees, taxes, etc.)
Printing bank statements
Updating passbooks
Cash advances
Cheque Processing Module
9|Page

Paying (in full or partially) the credit balance on a card


linked to a specific current account.
Transferring money between linked accounts (such as
transferring between checking and savings accounts)
Deposit currency recognition, acceptance, and recycling
In some countries, especially those which benefit from a fully
integrated cross-bank ATM network (e.g.: Multibanco in
Portugal), ATMs include many functions which are not
directly related to the management of one's own bank
account, such as:
Loading monetary value into stored value cards
Adding pre-paid cell phone / mobile phone credit.
Purchasing
Postage stamps.
Lottery tickets
Train tickets
Concert tickets
Movie tickets
Shopping mall gift certificates.
Gold
Donating to charities

Increasingly banks are seeking to use the ATM as a sales


device to deliver pre approved loans and targeted
10 | P a g e

advertising using products such as ITM (the Intelligent Teller


Machine) from Aptra Relate from NCR.[72] ATMs can also act
as an advertising channel for other companies.[73]*
A South Korean ATM with mobile bank port and bar code
reader
However several different technologies on ATMs have not yet
reached worldwide acceptance, such as:
Videoconferencing with human tellers, known as video
tellers[74]
Biometrics, where authorisation of transactions is based on
the scanning of a customer's fingerprint, iris, face, etc.[75]
[76][77]
Cheque/Cash Acceptance, where the ATM accepts and
recognise cheques and/or currency without using
envelopes[78] Expected to grow in importance in the US
through Check 21 legislation.
Bar code scanning
On-demand printing of "items of value" (such as movie
tickets, traveler's cheques, etc.)
Dispensing additional media (such as phone cards)
Co-ordination of ATMs with mobile phones
Integration with non-banking equipment
Games and promotional features
CRM at the ATM

11 | P a g e

ABOUT LANGUAGE

Java Technology
12 | P a g e

Java is the foundation for virtually every type of networked application and is the
global standard for developing and delivering embedded and mobile applications,
games, Web-based content, and enterprise software. With more than 9 million
developers worldwide, Java enables you to efficiently develop, deploy and use
exciting applications and services.
Java is a computer programming language that is concurrent, class-based, objectoriented, and specifically designed to have as few implementation dependencies as
possible. It is intended to let application developers "write once, run anywhere"
(WORA), meaning that code that runs on one platform does not need to be
recompiled to run on another. Java applications are typically compiled to
bytecode (class file) that can run on any Java virtual machine (JVM) regardless
of computer architecture. Java is, as of 2014, one of the most popular programming
languages in use, particularly for client-server web applications, with a reported 9
million developers. Java was originally developed by James Gosling at Sun
Microsystems (which has since merged into Oracle Corporation) and released in
1995 as a core component of Sun Microsystems' Java platform. The language
derives much of its syntax from C and C++, but it has fewer low-level facilities
than either of them.
From laptops to datacenters, game consoles to scientific supercomputers, cell
phones to the Internet, Java is everywhere!

13 | P a g e

The original and reference implementation Java compilers, virtual machines,


and class libraries were developed by Sun from 1991 and first released in 1995. As
of May 2007, in compliance with the specifications of the Java Community
Process, Sun relicensed most of its Java technologies under the GNU General
Public License. Others have also developed alternative implementations of these
Sun technologies, such as the GNU Compiler for Java (bytecode compiler), GNU
Classpath (standard libraries), and IcedTea -Web (browser plugin for applets).

97% of Enterprise Desktops Run Java


89% of Desktops (or Computers) in the U.S. Run Java
9 Million Java Developers Worldwide
#1 Choice for Developers
#1 Development Platform
3 Billion Mobile Phones Run Java
100% of Blu-ray Disc Players Ship with Java
5 Billion Java Cards in Use
125 million TV devices run Java
5 of the Top 5 Original Equipment Manufacturers Ship Java ME

14 | P a g e

Why Software Developers Choose Java


Java has been tested, refined, extended, and proven by a dedicated community of
Java developers, architects and enthusiasts. Java is designed to enable development
of portable, high-performance applications for the widest range of computing
platforms possible. By making applications available across heterogeneous
environments, businesses can provide more services and boost end-user
productivity, communication, and collaborationand dramatically reduce the cost
of ownership of both enterprise and consumer applications. Java has become
invaluable to developers by enabling them to:

Write software on one platform and run it on virtually any other platform

Create programs that can run within a web browser and access available
web services

Develop server-side applications for online forums, stores, polls, HTML


forms processing, and more

Combine applications or services using the Java language to create highly


customized applications or services

Write powerful and efficient applications for mobile phones, remote


processors, microcontrollers, wireless modules, sensors, gateways, consumer
products, and practically any other electronic device

15 | P a g e

SOME TECHNICAL INFORMATION


What will I get when I download Java software?
The Java Runtime Environment (JRE) is what you get when you download Java
software. The JRE consists of the Java Virtual Machine (JVM), Java platform core
classes, and supporting Java platform libraries. The JRE is the runtime portion of
Java software, which is all you need to run it in your Web browser.

What is Java Plug-in software?


The Java Plug-in software is a component of the Java Runtime Environment (JRE).
The JRE allows applets written in the Java programming language to run inside
various browsers. The Java Plug-in software is not a standalone program and
cannot be installed separately.

I have heard the terms Java Virtual Machine and JVM. Is this Java software?
The Java Virtual Machine is only one aspect of Java software that is involved in
web interaction. The Java Virtual Machine is built right into your Java software
download, and helps run Java applications.

16 | P a g e

History of JAVA
James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language
project in June 1991.[12] Java was originally designed for interactive television, but
it was too advanced for the digital cable television industry at the time.[13] The
language was initially called Oak after anoak tree that stood outside Gosling's
office; it went by the name Green later, and was later renamed Java, from Java
coffee,[14] said to be consumed in large quantities by the language's creators.[citation
needed]
Gosling aimed to implement a virtual machine and a language that had a
familiar C/C++ style of notation.[15]
Sun Microsystems released the first public implementation as Java 1.0 in 1995.[1] It
promised "Write Once, Run Anywhere" (WORA), providing 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.
With the advent of Java 2(released initially as J2SE 1.2 in December 1998 1999),
new versions had multiple configurations built for different types of platforms. For
example, J2EE targeted enterprise applications and the greatly stripped-down
version J2ME for mobile applications (Mobile Java). J2SEdesignated the Standard
Edition. In 2006, for marketing purposes, Sun renamed new J2 versions as Java
EE, Java ME, and Java SE, respectively.

17 | P a g e

In 1997, Sun Microsystems approached the ISO/IEC JTC1 standards body and
later the Ecma International to formalize Java, but it soon withdrew from the
process.[16] Java remains a de facto standard, controlled through the Java
Community Process.[17] At one time, Sun made most of its Java implementations
available without charge, despite their proprietary software status. Sun generated
revenue from Java through the selling of licenses for specialized products such as
the Java Enterprise System. Sun distinguishes between its Software Development
Kit (SDK) and Runtime Environment (JRE) (a subset of the SDK); the primary
distinction involves the JRE's lack of the compiler, utility programs, and header
files.
On November 13, 2006, Sun released much of Java as free and open source
software, (FOSS), under the terms of the GNU General Public License (GPL). On
May 8, 2007, Sun finished the process, making all of Java's core code available
under free software/open-source distribution terms, aside from a small portion of
code to which Sun did not hold the copyright.[18]
Sun's vice-president Rich Green said that Sun's ideal role with regards to Java was
as an "evangelist."[19] Following Oracle Corporation's acquisition of Sun
Microsystems in 20092010, Oracle has described itself as the "steward of Java
technology with a relentless commitment to fostering a community of participation
and transparency".[20] This did not hold Oracle, however, from filing a lawsuit
against Google shortly after that for using Java inside the Android SDK (see
Google section below). Java software runs on everything from laptops to data
18 | P a g e

centers, game consoles to scientific supercomputers. There are 930 million Java
Runtime Environment downloads each year and 3 billion mobile phones run
Java. On April 2, 2010, James Gosling resigned from Oracle.
Principles
There were five primary goals in the creation of the Java language:
1. It should be "simple, object-oriented and familiar"
2. It should be "robust and secure"
3. It should be "architecture-neutral and portable"
4. It should execute with "high performance"
5. It should be "interpreted, threaded, and dynamic"

Versions
Major release versions of Java, along with their release dates:

JDK 1.0 (January 21, 1996)

JDK 1.1 (February 19, 1997)

J2SE 1.2 (December 8, 1998)

J2SE 1.3 (May 8, 2000)

J2SE 1.4 (February 6, 2002)

J2SE 5.0 (September 30, 2004)

Java SE 6 (December 11, 2006)

Java SE 7 (July 28, 2011)

19 | P a g e

Java SE 8 (March 18, 2014)

DESIGN
20 | P a g e

DESIGN
UML DIAGRAMS:
Use case diagram

21 | P a g e

Sequence diagram

22 | P a g e

Collaboration diagram

23 | P a g e

E-R Diagram

24 | P a g e

25 | P a g e

PROJECT CODE

CardTransactions.java
import java.util.Scanner;
import java.awt.*;
//
import java.awt.event.*; // PACKAGES
import javax.swing.*;
//
import java.sql.*;
//
public class CardTransactions extends JFrame {
private JButton button1,button2,button3;
private JLabel label1,label2;
static String url = "jdbc:odbc:abc";
26 | P a g e

Container container;
//---Constructor--public CardTransactions(){
super(" Card Transactions");
Container container = getContentPane();
container.setLayout(null);
button1 = new JButton(">>>");
button1.setPreferredSize(new Dimension(100,30));
button1.setSize(button1.getPreferredSize());
button1.setLocation(30,50);
//---making connection with the database--button1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException a){
JOptionPane.showMessageDialog(null, url,"CLASS NOT
FOUND EXCEPTION !!!",JOptionPane.INFORMATION_MESSAGE);
}
//--goes to DB2-ChangePword to execute changing password-DB2 s=new DB2();s.ChangePword();
}
});
container.add(button1);
button2 = new JButton(">>>");
button2.setPreferredSize(new Dimension(100,30));
button2.setSize(button2.getPreferredSize());
button2.setLocation(30,100);
//--makes the connection with the database
//--and goes to DB2 to execute paying dept
button2.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event){
DB2 s=new DB2();s.DeptPaying();
}
});
container.add(button2);
button3 = new JButton("<BACK>");
button3.setPreferredSize(new Dimension(100,30));
27 | P a g e

button3.setSize(button3.getPreferredSize());
button3.setLocation(30,150);
button3.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event){
DB2 s=new DB2();s.Back();
}
});
container.add(button3);
label1 = new JLabel("Change Password");
label1.setPreferredSize(new Dimension(120,30));
label1.setSize(label1.getPreferredSize());
label1.setLocation(130,45);
container.add(label1);
label2 = new JLabel("Dept paying");
label2.setPreferredSize(new Dimension(120,30));
label2.setSize(label2.getPreferredSize());
label2.setLocation(130,98);
container.add(label2);
setSize(400,350);
setVisible(true);
}//--end of constructor
}

Cash.java
import java.awt.*;
//
import java.awt.event.*;
// PACKAGES
import javax.swing.*;
//
import java.sql.*;
//
public class Cash extends JFrame implements ActionListener{
public JButton button1,button2,button3,button4,button5,button6,cancelBut;
private JLabel label1,label2,label3,label4,label5,label6;
private JTextField textField;
static String url = "jdbc:odbc:abc";
//---Constructor--public Cash(){
28 | P a g e

super("Cash");
Container container=getContentPane() ;
container.setLayout(null);
textField=new JTextField(10);
button1 = new JButton(">>>");
button1.setPreferredSize(new Dimension(100,30));
button1.setSize(button1.getPreferredSize());
button1.setLocation(50,50);
button1.addActionListener(this);
container.add(button1);
button2 = new JButton(">>>");
button2.setPreferredSize(new Dimension(100,30));
button2.setSize(button2.getPreferredSize());
button2.setLocation(50,100);
button2.addActionListener(this);
container.add(button2);
button3 = new JButton(">>>");
button3.setPreferredSize(new Dimension(100,30));
button3.setSize(button3.getPreferredSize());
button3.setLocation(50,150);
button3.addActionListener(this);
container.add(button3);
button4 = new JButton("<<<");
button4.setPreferredSize(new Dimension(100,30));
button4.setSize(button4.getPreferredSize());
button4.setLocation(375,50);
//---makes the communication with the odbc Driver--button4.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event){
if(event.getSource()==button1){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException a){
JOptionPane.showMessageDialog(null, url,"CLASS NOT
FOUND EXCEPTION !!!",JOptionPane.INFORMATION_MESSAGE);
}}DB s=new DB();s.CashScreen();}
});
29 | P a g e

container.add(button4);
button5 = new JButton("<<<");
button5.setPreferredSize(new Dimension(100,30));
button5.setSize(button5.getPreferredSize());
button5.setLocation(375,100);
button5.addActionListener(this);
container.add(button5);
button6 = new JButton("<<<");
button6.setPreferredSize(new Dimension(100,30));
button6.setSize(button6.getPreferredSize());
button6.setLocation(375,150);
//---makes the communication with the odbc Driver--button6.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event){
if(event.getSource()==button1){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException a){
JOptionPane.showMessageDialog(null, url,"CLASS NOT
FOUND EXCEPTION !!!",JOptionPane.INFORMATION_MESSAGE);
}}DB s=new DB();s.ExecutionForAnother();}
});
container.add(button6);
cancelBut = new JButton("CANCEL");
cancelBut.setPreferredSize(new Dimension(100,30));
cancelBut.setSize(cancelBut.getPreferredSize());
cancelBut.setLocation(375,200);
cancelBut.addActionListener(this);
container.add(cancelBut);
label1=new JLabel(" 10 $");
label1.setPreferredSize(new Dimension(75,30));
label1.setSize(label1.getPreferredSize());
label1.setLocation(150,50);
container.add(label1);
label2=new JLabel("
30 | P a g e

20 $");

label2.setPreferredSize(new Dimension(75,30));
label2.setSize(label2.getPreferredSize());
label2.setLocation(300,50);
container.add(label2);
label3=new JLabel(" 40 $");
label3.setPreferredSize(new Dimension(75,30));
label3.setSize(label3.getPreferredSize());
label3.setLocation(150,100);
container.add(label3);
label4=new JLabel("
50 $");
label4.setPreferredSize(new Dimension(75,30));
label4.setSize(label4.getPreferredSize());
label4.setLocation(300,100);
container.add(label4);
label5=new JLabel(" 100 $");
label5.setPreferredSize(new Dimension(75,30));
label5.setSize(label5.getPreferredSize());
label5.setLocation(150,150);
container.add(label5);
label6=new JLabel(" Another..");
label6.setPreferredSize(new Dimension(85,30));
label6.setSize(label6.getPreferredSize());
label6.setLocation(300,150);
container.add(label6);
setSize(500,400);
setVisible(true);
}//---Method for Actionlistener--public void actionPerformed(ActionEvent event){
if(event.getSource()==cancelBut){
this.hide();//closes the present application
MainMenu s=new MainMenu();s.Main();//and goes to MainMenu
}
}
}
31 | P a g e

Information.java
import java.awt.*;
//
import java.awt.event.*; // PACKAGES
import javax.swing.*; //
import java.sql.*;
//
public class Information extends JFrame implements ActionListener {
private JButton button1,button2;
private JLabel label1,label2;
static String url = "jdbc:odbc:abc";
//-----Constructor-----public Information(){
super();
Container container = getContentPane();
container.setLayout(null);
button1 = new JButton(" >>> ");
button1.setPreferredSize(new Dimension(100,30));
button1.setSize(button1.getPreferredSize());
button1.setLocation(30,50);
button1.addActionListener(this);
container.add(button1);
button2 = new JButton(" CANCEL ");
button2.setPreferredSize(new Dimension(100,30));
button2.setSize(button2.getPreferredSize());
button2.setLocation(30,100);
button2.addActionListener(this);
container.add(button2);
label1 = new JLabel("Demonstration");
label1.setPreferredSize(new Dimension(120,30));
label1.setSize(label1.getPreferredSize());
label1.setLocation(150,43);
container.add(label1);
label2 = new JLabel("of Remainder");
label2.setPreferredSize(new Dimension(120,30));
32 | P a g e

label2.setSize(label2.getPreferredSize());
label2.setLocation(150,56);
container.add(label2);
setSize(400,300);
setVisible(true);
}//------actionPerformed method for ActionListener----public void actionPerformed(ActionEvent event){
if(event.getSource()==button1){
DB2 s=new DB2();s.Demonstration();
}
else if(event.getSource()==button2){
//--Closes the present window-this.hide();
//--Going to DB2 class for execution
DB2 s=new DB2();s.Back();
}
}
}

MainMenu.java
import java.awt.event.* ; //
import javax.swing.* ;
// PACKAGES
import java.awt.* ;
//
import java.sql.*;
//
//-----------------THE MAIN MENU--------------------public class MainMenu extends JFrame implements ActionListener {
private JButton but1, but2, but3, but4, but5, but6,but7,but8,but9 ;
private JLabel labb,label,label2,label3,label4,label4a,label5,label6,label6a,label7;
private JTextArea textarea;
private JPasswordField pwordfield;
private int pw,intt;
static String url = "jdbc:odbc:abc";
private String str1;
Container c;
33 | P a g e

//--Constructor---public MainMenu() {
super("ATM");
}
//----Method Main(The main Method)----public void Main(){
c = getContentPane() ;
c.setLayout(null) ;

but1 = new JButton(">>>") ;


but1.setPreferredSize( new Dimension(100,30) ) ;
but1.setSize( but1.getPreferredSize() ) ;
but1.setLocation(50,50) ;
but1.addActionListener(this) ;
c.add(but1) ;
but2 = new JButton(">>>") ;
but2.setPreferredSize( new Dimension(100,30) ) ;
but2.setSize( but2.getPreferredSize() ) ;
but2.setLocation(50,100) ;
but2.addActionListener(this) ;
c.add(but2) ;
but3=new JButton(">>>");
but3.setPreferredSize(new Dimension(100,30));
but3.setSize(but3.getPreferredSize());
but3.addActionListener(this);
but3.setLocation(50,150);
c.add(but3);
but4 = new JButton("<<<");
but4.setPreferredSize(new Dimension(100,30));
but4.setSize(but4.getPreferredSize());
but4.addActionListener(this);
but4.setLocation(375,50);
c.add(but4);
but5 = new JButton("<<<");
but5.setPreferredSize(new Dimension(100,30));
but5.setSize(but5.getPreferredSize());
34 | P a g e

but5.setLocation(375,100);
but5.addActionListener(this);
c.add(but5);
but6 = new JButton("<<<");
but6.setPreferredSize(new Dimension(100,30));
but6.setSize(but6.getPreferredSize());
but6.setLocation(375,150);
but6.addActionListener(this);
but6.addActionListener(new ActionListener(){
//----Creating the odbc Driver for but6----public void actionPerformed(ActionEvent event){
if(event.getSource()==but6){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException a){
JOptionPane.showMessageDialog(
null, url,"CLASS NOT FOUND
EXCEPTION !!!",JOptionPane.INFORMATION_MESSAGE);
}
}
}

});
c.add(but6);
but7 = new JButton("CANCEL");
but7.setPreferredSize(new Dimension(100,30));
but7.setSize(but7.getPreferredSize());
but7.setLocation(200,212);
but7.addActionListener(this);
c.add(but7);
label=new JLabel("CASH");
label.setPreferredSize(new Dimension(75,50));
label.setSize(label.getPreferredSize());
label.setLocation(160,40);
label.setToolTipText("to draw money,please click on the left button");
c.add(label);
35 | P a g e

label2 = new JLabel(" INFORMATION");


label2.setPreferredSize(new Dimension(85,50));
label2.setSize(label2.getPreferredSize());
label2.setLocation(280,40);
label2.setToolTipText("For information,please click on the left button");
c.add(label2);
label3 = new JLabel("TRANSFER");
label3.setPreferredSize(new Dimension(85,50));
label3.setSize(label3.getPreferredSize());
label3.setLocation(160,90);
label3.setToolTipText("for referring money,click on the right button");
c.add(label3);
label4 = new JLabel("CARD ");
label4.setPreferredSize(new Dimension(85,50));
label4.setSize(label4.getPreferredSize());
label4.setLocation(160,132);
label4.setToolTipText(
"For password,dept operations,please click on the left button");
c.add(label4);
label4a = new JLabel("TRANSACTIONS");
label4a.setPreferredSize(new Dimension(100,50));
label4a.setSize(label4a.getPreferredSize());
label4a.setLocation(160,148);
c.add(label4a);
label5 = new JLabel(" INVESTMENT");
label5.setPreferredSize(new Dimension(95,50));
label5.setSize(label5.getPreferredSize());
label5.setLocation(280,90);
label5.setToolTipText(
"To buy fund,bond etc.,please click on the right button");
c.add(label5);
label6 = new JLabel(" STANDARD");
label6.setPreferredSize(new Dimension(75,50));
label6.setSize(label6.getPreferredSize());
label6.setLocation(280,132);
label6.setToolTipText("To get 10$ rapidly,please click");
36 | P a g e

c.add(label6);
label6a = new JLabel(" CASH");
label6a.setPreferredSize(new Dimension(75,50));
label6a.setSize(label6a.getPreferredSize());
label6a.setLocation(280,147);
label6a.setToolTipText("To get 10$ rapidly please click");
c.add(label6a);
setSize(500,410) ;
show();
}
//------actionPerformed method for ActionListener----public void actionPerformed( ActionEvent event ){
if( event.getSource()==but7 )
System.exit(0) ;
else if( event.getSource() == but1 ){
new Cash();this.hide();}
else if(event.getSource()== but2 ){
new Transfer();this.hide();}
else if(event.getSource()==but3){
new CardTransactions();this.hide();}
else if(event.getSource()==but4 ){
new Information();this.hide();}
else if(event.getSource()==but6){
new StandardCash();this.hide();}
else if(event.getSource()==but9)
System.exit(0);
else if(event.getSource()==but8){
//----Select operation for comparison of first password entered----

String string = new String(pwordfield.getPassword());

this.hide();
//---Comparison---if there is not equivalent MainMenu does not appear----if(string.equals("admin")==true){MainMenu s=new MainMenu();s.Main();}
else {
37 | P a g e

JOptionPane.showMessageDialog(
null,"Invalid Password,Please try again",
"EXCEPTION",JOptionPane.ERROR_MESSAGE);
MainMenu s=new MainMenu();s.Password();
}
}
}//-----method main---Executes the password asking-------public static void main(String args[]){
MainMenu s=new MainMenu();
s.Password();
}//-----password method---------public void Password(){
c = getContentPane() ;
c.setLayout(new FlowLayout()) ;
c.setBackground(Color.lightGray);
pwordfield=new JPasswordField(17);
c.add(pwordfield);
but8=new JButton("OK");
but8.setPreferredSize(new Dimension(90,25));
but8.setSize(but8.getPreferredSize());
but8.addActionListener(this);
c.add(but8);
but9=new JButton("CANCEL");
but9.setPreferredSize(new Dimension(90,25));
but9.setSize(but9.getPreferredSize());
but9.addActionListener(this);
c.add(but9);
//-----Informations about the program----String sttr="
W E L C O M E!\n"+
" Please write your password:\n"+
"----------------------------------------------\n";

//-----set up textarea---------------textarea = new JTextArea(sttr,10,17);


c.add(new JScrollPane(textarea));
textarea.setBackground(Color.lightGray);
38 | P a g e

textarea.setEditable(false);
setSize(250,300) ;
show();
}
}

StandardCash.java
import java.awt.*;
//
import java.awt.event.*; // PACKAGES
import javax.swing.*;
//
import java.sql.*;
//
public class StandardCash extends JFrame implements ActionListener {
private JButton button1,button2;
private JLabel label1;
private String str1;
private int Amount,Password;
private JTextField text1;
static String url = "jdbc:odbc:abc";
Container container;
//SET UP GUI
public StandardCash(){
super("Standard Cash (10$)");
Container container = getContentPane();
container.setLayout(null);
button1 = new JButton("OK");
button1.setPreferredSize(new Dimension (90,30));
button1.setSize(button1.getPreferredSize());
button1.setLocation(50,100);
button1.addActionListener(this);
container.add(button1);
text1=new JTextField(10);
text1.setPreferredSize(new Dimension(10,22));
text1.setSize(text1.getPreferredSize());
text1.setLocation(50,60);
container.add(text1);

39 | P a g e

button2 = new JButton("CANCEL");


button2.setPreferredSize(new Dimension (90,30));
button2.setSize(button2.getPreferredSize());
button2.addActionListener(this);
button2.setLocation(150,100);
container.add(button2);
label1 = new JLabel("Please enter your password:");
label1.setPreferredSize(new Dimension(250,20));
label1.setSize(label1.getPreferredSize());
label1.setLocation(50,40);
container.add(label1);
setSize(350,300);
show();
}//------Method for ActionListener----------------public void actionPerformed(ActionEvent event){
if(event.getSource()==button1){
//Selecting the values for the user-------try{
str1=text1.getText();
int int1=Integer.parseInt(str1);
String run = "SELECT * FROM abc " +"WHERE password = " +int1;
System.out.println(run + "SQL string executed");
Connection connection = DriverManager.getConnection(url,"","");
Statement stmt = connection.createStatement();
ResultSet result=stmt.executeQuery(run);
while(result.next()){
String name = result.getString(1);
String surname = result.getString(2);
int amount = result.getInt(3);
int password = result.getInt(4);
Password=password;
Amount=amount-10;
}
connection.close();
}
catch(SQLException a){
40 | P a g e

JOptionPane.showMessageDialog(
null,url,"SQL EXCEPTION AT SELECT OPERATION",
JOptionPane.INFORMATION_MESSAGE);
}
//-----Updating the Amount that is reduced up ^^---------String run = "UPDATE abc SET " +
"amount='" +Amount+"' WHERE password="+Password;
try{
Connection connection = DriverManager.getConnection(url,"","");
Statement stmt = connection.createStatement();
stmt.executeUpdate(run);
System.out.println("Operation completed...");
connection.close();
}catch(SQLException a){JOptionPane.showMessageDialog(
null,url,"SQL EXCEPTION AT UPDATE OPERATION",
JOptionPane.INFORMATION_MESSAGE);
}
}
else if(event.getSource()==button2){
this.hide();
MainMenu s=new MainMenu();s.Main();
}
}
}

Transfer.java
import java.awt.*;
//
import java.awt.event.*;
//
import javax.swing.*;
// PACKAGES
import java.sql.*;
//
import sun.jdbc.odbc.*; //
public class Transfer extends JFrame implements ActionListener{
private JTextField textfield1,textfield2,textfield3,textfield4,textfield5;
private JButton OKButton,ExitButton;
private JLabel label;
41 | P a g e

private int int1,int2,int3,Amount,Amount1,Password;


private String str1,str2,str3;
static String url = "jdbc:odbc:abc";
//SET UP GUI
public Transfer(){
super("Money Transfer");
Container container = getContentPane();
container.setLayout(new FlowLayout() );
label=new JLabel("Password of the user:");
label.setLocation(200,50);
container.add(label);
textfield5 = new JTextField(15);
container.add(textfield5);
textfield1 = new JTextField("Password of the receiver:");
textfield1.setEditable(false);
container.add(textfield1);
textfield2 = new JTextField(15);
container.add(textfield2);
textfield3 = new JTextField("Amount of the sent:",15);
textfield3.setEditable(false);
container.add(textfield3);
textfield4 = new JTextField(15);
container.add(textfield4);
OKButton = new JButton("OK");
OKButton.setPreferredSize(new Dimension(80,20));
OKButton.setSize(OKButton.getPreferredSize());
OKButton.addActionListener(this);
container.add(OKButton);
ExitButton = new JButton("Exit");
ExitButton.setPreferredSize(new Dimension(80,20));
ExitButton.setSize(ExitButton.getPreferredSize());
ExitButton.addActionListener(this);
container.add(ExitButton);
setSize(400,150);
42 | P a g e

setVisible(true);
}//-------------actionPerformed---------------------------------------public void actionPerformed(ActionEvent event){
if(event.getSource()==ExitButton){
this.hide();MainMenu s=new MainMenu();s.Main();
}
else if(event.getSource()==OKButton){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException a){
JOptionPane.showMessageDialog(null, url,"CLASS NOT FOUND
EXCEPTION !!!",JOptionPane.INFORMATION_MESSAGE);
}
}
try{ //Select operation:
str3=textfield5.getText(); // gets password of user
int1=Integer.parseInt(str3);
String run = "SELECT * FROM abc " +"WHERE password = " +int1;
System.out.println(run + "SQL string executed");
Connection connection = DriverManager.getConnection(url,"","");
Statement stmt = connection.createStatement();
ResultSet result=stmt.executeQuery(run);
while(result.next()){
String name = result.getString(1);
String surname = result.getString(2);
int amount = result.getInt(3);
int password = result.getInt(4);
Amount=amount;
}
connection.close();
}
catch(SQLException a){
JOptionPane.showMessageDialog(null,url,"SQL EXCEPTION AT
SELECT OPERATION",JOptionPane.INFORMATION_MESSAGE);
}
str2=textfield4.getText(); //amount of sent
int3=Integer.parseInt(str2);
Amount=Amount-int3;
43 | P a g e

//--------------Updating values of the database------------String run = "UPDATE abc SET " +


"amount='" +Amount+"' WHERE password="+int1;
try{
Connection connection = DriverManager.getConnection(url,"","");
Statement stmt = connection.createStatement();
stmt.executeUpdate(run);
System.out.println("Operation completed...");
connection.close();
}catch(SQLException a){JOptionPane.showMessageDialog(null,url,"SQL
EXCEPTION AT UPDATE OPERATION",JOptionPane.INFORMATION_MESSAGE);
}
//---Select operation for the person (the money transferred to)-----try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}catch(ClassNotFoundException a){
JOptionPane.showMessageDialog(null, url,"CLASS NOT FOUND
EXCEPTION !!!",JOptionPane.INFORMATION_MESSAGE);
}
try{
str1=textfield2.getText();//password of receiver
int2=Integer.parseInt(str1);
String run2 = "SELECT * FROM abc " +"WHERE password = " +int2;
System.out.println(run2 + "SQL string executed");
Connection connection = DriverManager.getConnection(url,"","");
Statement stmt = connection.createStatement();
ResultSet result=stmt.executeQuery(run2);
while(result.next()){
String name = result.getString(1);
String surname = result.getString(2);
int amount = result.getInt(3);
int password = result.getInt(4);
Amount1=amount;
}
connection.close();
}
catch(SQLException a){
JOptionPane.showMessageDialog(null,url,"SQL EXCEPTION AT
SELECT OPERATION",JOptionPane.INFORMATION_MESSAGE);
44 | P a g e

}
Amount1=Amount1+int3;
//---------Updating the values for the person,money transferred to-String run1 = "UPDATE abc SET " +
"amount='" +Amount1+"' WHERE password="+int2;
try{
Connection connection = DriverManager.getConnection(url,"","");
Statement stmt = connection.createStatement();
stmt.executeUpdate(run1);
System.out.println("Operation completed...");
connection.close();
}catch(SQLException a){JOptionPane.showMessageDialog(null,url,"SQL
EXCEPTION AT UPDATE OPERATION",JOptionPane.INFORMATION_MESSAGE);
}
}
}

45 | P a g e

SCREENSHOTS

Login Screen

46 | P a g e

Main Menu

47 | P a g e

Cash Screen

48 | P a g e

Money Transfer

49 | P a g e

Card Transaction

50 | P a g e

Standard Cash

51 | P a g e

52 | P a g e