ATM Simulator
Chapter 1
INTRODUCTION
The aim of the ATM Simulation System project is to build a Java based ATM (Automated
Teller Machine) Simulation System. The introduction of ATM’s by various banks have
brought about freedom from the interminable queues in front of withdrawal counters at
banks. This ATM Simulation System requires the constant updating of records between
the bank servers and a spread out network of ATM’s.
DYPP 1 Computer Engineering
ATM Simulator
Chapter 2
Program
import java.util.Scanner;
class Bank
{
private String accno;
private String name;
private long balance;
Scanner A=new Scanner(System.in);
void openAccount()
{
System.out.print("Enter Account No: ");
accno=A.next();
System.out.print("Enter Name: ");
name=A.next();
System.out.print("Enter Balance: ");
balance=A.nextLong();
}
//method to display account details
void showAccount()
{
System.out.println(accno+","+name+","+balance);
}
//method to deposit money
void deposit()
{
long amt;
System.out.println("Enter Amount U Want to Deposit : ");
amt=A.nextLong();
balance=balance+amt;
}
//method to withdraw money
void withdrawal()
{
DYPP 2 Computer Engineering
ATM Simulator
long amt;
System.out.println("Enter Amount U Want to withdraw : ");
amt=A.nextLong();
if(balance>=amt)
{
balance=balance-amt;
}
else
{
System.out.println("Less Balance..Transaction Failed..");
}
}
//method to search an account number
boolean search(String acn)
{
if(accno.equals(acn))
{
showAccount();
return(true);
}
return(false);
}
}
class ExBank
{
public static void main(String arg[])
{
Scanner A=new Scanner(System.in);
//create initial accounts
System.out.print("How Many Customer U Want to Input : ");
int n=A.nextInt();
Bank C[]=new Bank[n];
for(int i=0;i<C.length;i++)
{
C[i]=new Bank();
C[i].openAccount();
}
//run loop until menu 5 is not pressed
int ch;
do
{
System.out.println("Main Menu\n
1.Display All\n
2.Search By Account\n
DYPP 3 Computer Engineering
ATM Simulator
3.Deposit\n
4.Withdrawal\n
5.Exit");
System.out.println("Ur Choice :");
ch=A.nextInt();
switch(ch)
{
case 1:
for(int i=0;i<C.length;i++)
{
C[i].showAccount();
}
break;
case 2:
System.out.print("Enter Account No U Want to Search...: ");
String acn=A.next();
boolean found=false;
for(int i=0;i<C.length;i++)
{
found=C[i].search(acn);
if(found)
{
break;
}
}
if(!found)
{
System.out.println("Search Failed..Account Not Exist..");
}
break;
case 3:
System.out.print("Enter Account No : ");
acn=A.next();
found=false;
for(int i=0;i<C.length;i++)
{
found=C[i].search(acn);
if(found)
{
C[i].deposit();
break;
}
}
if(!found)
{
System.out.println("Search Failed..Account Not Exist..");
DYPP 4 Computer Engineering
ATM Simulator
}
break;
case 4:
System.out.print("Enter Account No : ");
acn=A.next();
found=false;
for(int i=0;i<C.length;i++)
{
found=C[i].search(acn);
if(found)
{
C[i].withdrawal();
break;
}
}
if(!found)
{
System.out.println("Search Failed..Account Not Exist..");
}
break;
case 5:
System.out.println("Good Bye..");
break;
}
}
while(ch!=5);
}
}
DYPP 5 Computer Engineering
ATM Simulator
Chapter 3
Output
1.Creating a database.
2. Display the database.
DYPP 6 Computer Engineering
ATM Simulator
3.Search operation to display details of a specific account.
4.Depositing money in the account.
DYPP 7 Computer Engineering
ATM Simulator
5.Withdrawing money from an account.
6. Exiting the program.
DYPP 8 Computer Engineering
ATM Simulator
Chapter 4
Conclusion
We have explored practicality of doing parallel computing in java and we have successfully implemented
our Atm Simulator In java. we have efficiently programed and executed in java.
DYPP 9 Computer Engineering
ATM Simulator
References
JAVA Nirali
JAVA Techmax
JAVA Technical
JAVA complete Reference
DYPP 10 Computer Engineering
ATM Simulator
WEEKLY PROGRESS REPORT
MICRO PROJECT
SR.NO. WEEK ACTIVITY PERFORMED SIGN OF GUIDE DATE
st
1 1 Discussion and finalization of
topic
2 2nd Preparation and submission of
Abstract
3 3rd Submission of Introduction
4 4th Collection of Data
5 5th Collection of Data
6 6th Collection of data
7 7th Discussion and outline of
Content
8 8th Discussion and outline of Content
9 9th Formulation of content
10 10th Formulation of content
11 11th Implementation of program
12 12th Editing & proof reading of content
13 13th Compilation of report
14 14th Viva voce
15 15th Correction of report
16 16th Final submission of Micro Project
Sign of the student Sign of the faculty
DYPP 11 Computer Engineering
ATM Simulator
ANEEXURE II
Evaluation Sheet for the Micro Project
Academic Year: 2018-19 Name of the Faculty: Prof. Sunraj Mane
Course: Java Programing Course code: 22412
Semester: 4th
Title of the project: ATM Simulator
Cos addressed by Micro Project:
A: Develop program using object oriented methodology in java.
B: Develop program using multithreading.
Major learning outcomes achieved by students by doing the project
(a) Practical outcome:
1) Deliver a java programming for atm simulator
(b) Unit outcomes in Cognitive domain:
1) We can in program Java without errors.
(c) Outcomes in Affective domain:
1) Function as team member
2) Follow Ethics
Comments/suggestions about team work /leadership/inter-personal communication (if any)
………………………………………………………………………………………………………………
Marks out of 6 Marks out of 4for
for performance performance in
Roll No Student Name in group activity oral/ presentation Total out of 10
(D5 Col.8) (D5 Col.9)
10 Mohit Patil
13 Abhishek Sharma
21 Pranav Pingale
(Signature of Faculty)
DYPP 12 Computer Engineering