Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

PEM SCHOOL OF EXCELLENCE

Vijayapuram Post-Tirupur-641606

ATM MANAGER

PROJECT

SUBMITTED BY

R.CHRISTINA SHARON

GRADE 12

UNDER THE GUIDANCE


OF
Ms.DHANALAKSHMI
DEPARTMENT OF COMPUTER SCIENCE
CERTIFICATE

This is to certify that the Project entitled “ATM MANAGER” submitted in


partial fulfillment of the requirements for the award of AISSCE practical
examination in COMPUTER SCIENCE to PEM SCHOOL OF EXCELLENCE
Affiliated to Central Board of Secondary Education, New Delhi, is a record of
Bonafide work carried out by R.CHRISTINA SHARON , under my
supervision and guidance, that no part of this project has been submitted for the
award of any other examination and the work has not been published in popular
journal or magazine.

Signature of the Guide Signature of the Principal

Signature of Signature of
External Examiner Internal Examiner
DECLARATION

I hereby declare that the training entitled “ATM MANAGER” submitted to


PEM SCHOOL OF EXCELLENCE, Senior Secondary School, affiliated to
Central Board of Secondary Education, New Delhi, in partial fulfillment of the
requirements for AISSCE practical examination is an original work and it has
not been previously formed the basis for the award of any examination during
the period of my study.

Place: Tirupur
Signature of the Candidate

Date:
ACKNOWLEDGEMENT

Apart from the efforts of me, the success of any project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express
my gratitude to the people who have been instrumental in successful completion
of this project.

I express my sincere thanks to Correspondent mam,PEM SCHOOL OF


EXCELLENCE for providing me an infrastructure and moral support while
carrying out this project in the school.

I express my deep sense of gratitude to Principal sir, PEM SCHOOL OF


EXCELLENCE who has been continuously motivating and extendingtheir helping
hand to us.

My sincere thanks to Ms. DHANALAKSHMI master In-charge, a Guide,


mentor all the above a friend, who critically reviewed my project and helped in
solving every problem, occurred during implementation of the project.

I gratefully acknowledge the contribution of the individuals who contributed to


bringing this project up to this level, who continues to look after me despite my
flaws.

I express my heartfelt gratitude to my parents for constant encouragement while


carrying out this project.

The guidance and support received from all the members who contributed and
who are contributing to this project, was vital for the success of the project. I am
grateful for their constant support and help.
SYNOPSIS

An automated teller machine (ATM) is an electronic banking outlet that allows


customers to complete basic transactions without the aid of a branch
representative or teller.

The ATM System is the project which is used to access their bank accounts in
order to make cash withdrawals. Whenever the user need to make cash
withdraws, they can enter their PIN number (personal identification number)
and it will display the amount to be withdrawn. Once their withdrawn was
successful, the amount will be debited in their account.

The ATM will service one customer at a time. A customer will be required to
enter ATM Card number, personal identification number (PIN). The customer
will then be able to perform one or more transactions.

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.
TABLE OF CONTENTS

CONTENTS:

1. Introduction

2. System Study

2.1 Existing system

2.2 Proposed system

3. System specifications

3.1 Hardware configuration

3.2 Software configuration

4. Source code

5. Sample output

6. Conclusion

7. Bibliography
1.INTRODUCTION

Automated Teller Machine enables the clients of a bank to have access to their
account without going to the bank. This is achieved only by development the
application using online concepts.

When the product is implemented, the user who uses this product will be able to
see all the information and services provided by the ATM, when he enters the
necessary option and arguments. The product also provides services like
request for cheques, deposit cash and other advanced requirement of the
user. The data is stored in the database and is retrieved whenever
necessary. The implementation needs ATM machine hardware to operate or
similar simulated conditions can also be used to successfully use the developed
product. This program simulates how the ATM (Automatic Teller Machine) of
the SCS works. Therefore, the program does the following basic ATM
requirements:

1. Account creation

2. View all customers

3. Check Balance

4. Deposit Amount

5. Withdraw Amount

6. View all accounts

The program is designed in such a way that the user has to enter their account
number, customer id and pin number in order to do any transaction. Once
verified, he is provided a menu and he/she had to enter the option provided in
the menu. For example, when the user wants to view their balance than he/she
had to enter the option for check balance provided in the main menu. When the
option is entered alone with the respective argument, then the account balance is
displayed on the screen.

The user is given options to even view the no of customers in the software. The
user may experience a delay in retrieving or viewing the data, when there are
many users logged on to the same bank branch system.
2.SYSTEM STUDY

2.1 Existing system :

An automated teller machine is used in day-to-day life by a number of


people all around the world. Today’s technology allows users to deposit,
withdraw and check their account details from the comfort of their home. The
available atm codes are complex with lengthy procedures and that are difficult
to understand.

Atm’s are used to deposit, withdraw, view their account details and check their
balance. Codes usually crash or turn into a disaster when not managed properly
during run-time faults and errors.

2.2 Proposed system:

The code allows the user to create an account and lets the user to deposit
money, withdraw money, check their account balance and view all
customers/accounts. The access of transaction is allowed only after the
verification of their atm pin. Mysql.connector and datetime modules have been
imported. Somehow every child / student or even adults manage to loose their
money atleast once in their lifetime. In order to make the in school purchases
easier our team has developed this program such that the parents can initialize
their child’s account with a minimal amount of balance , which then the office
members will help the child to use the money from the account for all his/her
purchases of school things/ food items in canteens. The proposed system seems
practical enough for the use of school children.
3 . SYSTEM SPECIFICATIONS

3.1. Hardware Configuration:

Laptop - Dell
Processor -11th Gen Intel(R)core(TM ) i3- 1115G4 @3.00
GHz 3.00 GHz
Clock speed - 2.10 GHz
Installed RAM - 8.00 GB
Memory - 512 GB
System type - 64-bit OS, x64-based processor

3.2. Software Configuration:


Operating System - Windows 11
Front-end - Python 3.11.2
Back -end - MySQL 8.0
4. SOURCE CODE

# IMPORTING NECESSARY MODULES


import mysql.connector
from datetime import datetime
# GLOBAL VARIABLES DECLARATION
myConnnection =""
cursor=""
userName=""
password =""
cid=""
#TO CHECK MYSQL CONNECTIVITY
def MYSQLconnectionCheck ():
global myConnection
global userName
global password
userName = input("\n ENTER MYSQL SERVER'S USERNAME : ")
password = input("\n ENTER MYSQL SERVER'S PASSWORD : ")
myConnection=mysql.connector.connect(host="localhost",user=userNam
e,passwd=password ,auth_plugin='mysql_native_password' )
if myConnection:
print("\n CONGRATULATIONS ! YOUR MYSQL CONNECTION
HAS BEEN ESTABLISHED !")
cursor=myConnection.cursor()
cursor.execute("CREATE DATABASE IF NOT EXISTS ATM")
cursor.execute("COMMIT")
cursor.close()
return myConnection
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION
CHECK USERNAME AND PASSWORD !")

# ESTABLISHED MYSQL CONNECTION


def MYSQLconnection ():
global userName
global password
global myConnection
myConnection=mysql.connector.connect(host="localhost",user=userNam
e,passwd=password ,database="ATM" ,
auth_plugin='mysql_native_password' )
if myConnection:
return myConnection
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")
myConnection.close()
# MODULE TO CREATE NEW CUSATOMER
def newCustomer():
global cid
if myConnection:
cursor=myConnection.cursor()
createTable ="""CREATE TABLE IF NOT EXISTS
CUSTOMER(CID VARCHAR(10) PRIMARY KEY,CNAME
VARCHAR(30) NOT NULL,ADDRESS VARCHAR(30)NOT NULL
,PHONE VARCHAR(12) NOT NULL)"""
cursor.execute(createTable)
print("\nPlease Fill All The Information Carefully !")
cid=input("Please Enter Customer ID : ")
cname=input("Please Enter Customer Name : ")
address=input("Please Enter Customer Address : ")
phone=input("Please Enter Customer Contact No. : ")
sql='INSERT INTO CUSTOMER(cid,cname,address,phone)
values(%s,%s,%s,%s)'
values=(cid,cname,address,phone)
cursor.execute(sql,values)
cursor.execute("COMMIT")
cursor.close()
print("\nNew Customer Added Successfully !")

# TO DISPLAY CUSTOMER INFORMATION :


def displayAllCustomer():
if myConnection:
cursor=myConnection.cursor()
cursor.execute("SELECT * FROM CUSTOMER")
data = cursor.fetchall()
if data:
print("\n*****DETAILS OF ALL CUSTOMER*****")
print(data)
else:
print("Sorry ! No Record Found , Please Try Again ! ")
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")

# TO SEARCH A CUSTOMER
def searchCustomer():
global cid
if myConnection:
cursor=myConnection.cursor()
cid=input("Please Enter Customer ID : ")
sql="SELECT * FROM CUSTOMER WHERE CID = %s"
values=(cid,)
data=cursor.execute(sql,values)
data = cursor.fetchall()
if data:
print("\n*****CUSTOMER DETAILS*****")
print(data)
else:
print("Sorry ! Customer NOT Found , Please Try Again ! ")
else:
print("\nSomething Went Wrong ,Please Try Again !")

# TO OPEN A NEW ACCOUNT


def newAccount():
global cid
if myConnection:
cursor=myConnection.cursor()
cid=input("Please Enter Customer ID : ")
createTable ="""
CREATE TABLE IF NOT EXISTS ACCOUNT(
CID VARCHAR(10),
ACCOUNT_NO INT(15) PRIMARY KEY,
ACCOUNT_TYPE VARCHAR(20) NOT NULL ,
AMOUNT INT(10) NOT NULL ,
PIN INT(4) NOT NULL UNIQUE ) """
cursor.execute(createTable)
account_no=int(input("PLEASE ENTER THE ACCOUNT
NUMBER [0-9]: "))
account_type=input("PLEASE ENTER THE ACCOUNT TYPE [ S-
SAVING / C - CURRENT ] : ")
amount=int(input("PLEASE ENTER THE AMOUNT TO DEPOSIT :
"))
ATM_pin=int(input("PLEASE ENTER THE ATM PIN [ FOUR
DIGITIS ONLY ] : "))
sql='INSERT INTO ACCOUNT
(cid,account_no,account_type,amount ,pin) VALUES (%s,%s,%s,%s,%s)'
values1=(cid,account_no,account_type,amount,ATM_pin)
cursor.execute(sql,values1)
cursor.execute("COMMIT")
print("\nNew Account Opened Successfully !")

else:
print("\nSomething Went Wrong ,Please Try Again !")
# TO DISPLAY ALL ACCOUNTS
def displayAllAccounts():

if myConnection:

cursor=myConnection.cursor()
cursor.execute("SELECT * FROM ACCOUNT")
data = cursor.fetchall()
if data:
print("\n*****DETAILS OF ALL ACCOUNTS*****")
print(data)
else:
print("Sorry ! No Account Information , Please Try Again ! ")
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")
# TO SEARCH AN ACCOUNT
def searchAccount():
global cid
if myConnection:
cursor=myConnection.cursor()
cid=input("PLEASE ENTER CUSTOMER ID : ")
account_no=int(input("PLEASE ENTER THE ACCOUNT
NUMBER [0-9]: "))
sql="SELECT * FROM ACCOUNT WHERE CID = %s AND
ACCOUNT_NO =%s"
values=(cid,account_no)
data=cursor.execute(sql,values)
data = cursor.fetchall()
if data:
print("\n*****CUSTOMER ACCOUNT DETAILS*****")
print(data)
else:
print("Sorry ! Account Information NOT Found , Please Try Again
! ")
else:
print("Something Went Wrong ,Please Try Again !")
# TO WITHDRAW AMOUNT
def withdrawAmount():
count =3
if myConnection:
cursor=myConnection.cursor()
account_no=int(input("PLEASE ENTER THE ACCOUNT
NUMBER [0-9]: "))
cid=int(input(" PLEASE ENTER THE CUSTOMER ID : "))
sql="SELECT * FROM ACCOUNT WHERE ACCOUNT_NO =%s"
values=(account_no,)
data=cursor.execute(sql,values)
data = cursor.fetchall()
if data:
while True:
ATM_PIN=int(input("PLEASE ENTER THE ATM PIN - ONLY
3 ATTEMPTS ARE ALLOWED : "))
sql='SELECT * FROM ACCOUNT WHERE PIN = %s'
values=(ATM_PIN,)
cursor.execute(sql,values)
currentdate=datetime.now()
data = cursor.fetchall()
if data:
amount=int(input("PLEASE ENTER AMOUNT TO
WITHDRAW : "))
sql='UPDATE ACCOUNT SET AMOUNT = AMOUNT - %s'
cursor.execute(sql ,(amount,))
cursor.execute("COMMIT")
withdrawaltable = """
CREATE TABLE IF NOT EXISTS WITHDRAWALS(
CID VARCHAR(10),
ACCOUNT_NO INT(15),
WITHDRAWN_AMOUNT INT(10) NOT NULL ,
DATE_OF_WITHDRAWAL DATE) """
cursor.execute(withdrawaltable)
sql1='INSERT INTO WITHDRAWALS
(CID,ACCOUNT_NO,WITHDRAWN_AMOUNT,DATE_OF_WITHDR
AWAL) VALUES (%s,%s,%s,%s)'
values2=(cid, account_no,amount,currentdate)
cursor.execute(sql1, values2)
cursor.execute("COMMIT")
print("******* TRANSACTION SUCCESSFULLY
COMPLETED ! *******")
print("***** PLEASE REMOVE YOUR CARD ! *****")
break
else:
print("Wrong Pin ! Please enter a Valid PIN")
count=count-1
print("You are left with only ",count ,"Attempts")
if count == 0:
print("Your Card has been Blocked , Please Visit the Branch to
activate it")
break
else:
print("Sorry ! Account Information NOT Found , Please Try
Again ! ")
# TO DEPOSIT AMOUNT
def depositAmount():
count=3
if myConnection:
cursor=myConnection.cursor()
account_no=int(input("PLEASE ENTER THE ACCOUNT
NUMBER [0-9]: "))
cid=int(input(" PLEASE ENTER THE CUSTOMER ID : "))
sql="SELECT * FROM ACCOUNT WHERE ACCOUNT_NO =%s"
values=(account_no,)
data=cursor.execute(sql,values)
data = cursor.fetchall()
if data:
while True:
ATM_PIN=int(input("PLEASE ENTER THE ATM PIN - ONLY
3 ATTEMPTS ARE ALLOWED : "))
sql='SELECT * FROM ACCOUNT WHERE PIN = %s'
values=(ATM_PIN,)
cursor.execute(sql,values)
currentdate=datetime.now()
data = cursor.fetchall()

if data:
Damount=int(input("PLEASE ENTER AMOUNT TO
DEPOSIT : "))
sql='UPDATE ACCOUNT SET AMOUNT = AMOUNT +
%s'
cursor.execute(sql ,(Damount,))
cursor.execute("COMMIT")
depositiontable = """
CREATE TABLE IF NOT EXISTS DEPOSITS(
CID VARCHAR(10),
ACCOUNT_NO INT(15),
DEPOSITED_AMOUNT INT(10) NOT NULL ,
DATE_OF_DEPOSITION DATE) """
cursor.execute(depositiontable)
sql2='INSERT INTO DEPOSITS
(CID,ACCOUNT_NO,DEPOSITED_AMOUNT,DATE_OF_DEPOSITI
ON) VALUES (%s,%s,%s,%s)'
values3=(cid, account_no,Damount,currentdate)
cursor.execute(sql2, values3)
cursor.execute("COMMIT")
print("******* TRANSACTION SUCCESSFULLY
COMPLETED ! *******")
print("***** PLEASE REMOVE YOUR CARD ! *****")
break
else:
print("Wrong Pin ! Please enter a Valid PIN")
count=count-1
print("You are left with only ",count ,"Attempts")
if count == 0:
print("Your Card has been Blocked , Please Visit the Branch
to activate it")
break
else:
print("Sorry ! Account Information NOT Found , Please Try Again !
")
# TO VIEW BALANCE
def viewBalance():
if myConnection:
cursor=myConnection.cursor()
cursor.execute("SELECT * FROM ACCOUNT")
data = cursor.fetchall()
if data:
account_no=int(input("PLEASE ENTER THE ACCOUNT
NUMBER [0-9]: "))
cid=int(input(" PLEASE ENTER THE CUSTOMER ID : "))
sql3="SELECT AMOUNT FROM ACCOUNT WHERE
ACCOUNT_NO =%s"
values4=(account_no,)
data1=cursor.execute(sql3,values4)
data1 = cursor.fetchall()
print("\n*****ACCOUNT BALANCE*****")
print(str(data1))
else:
print("Sorry ! No Record Found , Please Try Again ! ")
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION !")

# TO PROVIDE HELP FOR USER


def helpMe():
print("Please, Visit The Official Website of SCS To Download The
Manual !!!")
print(" Kindly visit the front office for further queries")
print(" THANK YOU!")

# MAIN SCREEN
print("************** SUBBIAH CENTRAL ***************")
print("************* SCS - ATM MANAGER ***************")
print("*****Designed and Maintained By:")
print("*****NAKSHATRA.R - CLASS XII A ")
print("*****AMIRTHA VARSHINI.N.J - CLASS XII A ")
print("*****KARUPPANA HARI.S - CLASS XII A ")

#STARTING POINT OF THE SYSTEM


myConnection = MYSQLconnectionCheck ()
if myConnection:
MYSQLconnection ()
while(1):
print("*********** SUBBIAH CENTRAL ***************")
print("************ SCS - ATM MANAGER ***************")
print("*****Designed and Maintained By:")
print("*****NAKSHATRA.R - CLASS XII A ")
print("*****AMIRTHA VARSHINI.N.J - CLASS XII A ")
print("*****KARUPPANA HARI.S - CLASS XII A ")
print("\n!============*************===============!")

print("! PLEASE ENTER 1 FOR NEW USER !")


print("! PLEASE ENTER 2 TO DISPLAY ALL CUSTOMERS !")
print("! PLEASE ENTER 3 TO SEARCH A CUSTOMER !")
print("! PLEASE ENTER 4 TO OPEN NEW ACCOUNT !")
print("! PLEASE ENTER 5 TO DISPLAY ALL ACCOUNTS !")
print("! PLEASE ENTER 6 TO SEARCH AN ACCOUNT !")
print("! PLEASE ENTER 7 TO WITHDRAW AMOUNT !")
print("! PLEASE ENTER 8 TO DEPOSIT AMOUNT !")
print("! PLEASE ENTER 9 TO VIEW BALANCE !")
print("! PLEASE ENTER 10 TO EXIT !")
print("! PLEASE ENTER 0 FOR HELP !")

print("\n!=================*****END*****==============!")

choice = int(input("\n Please Enter Your Choice : "))


if choice == 1:
newCustomer()
elif choice == 2:
displayAllCustomer()
elif choice == 3:
searchCustomer()
elif choice == 4:
newAccount()
elif choice==5:
displayAllAccounts()
elif choice==6:
searchAccount()
elif choice==7:
withdrawAmount()
elif choice==8:
depositAmount()
elif choice==9:
viewBalance()
elif choice==10:
break
elif choice==0:
helpMe()
else:
print("Sorry ,kindly enter the correct input, Please Try Again !!!")
else:
print("Check Your MYSQL Connection First !!! ")
## END OF THE PROJECT
## THANK YOU
## BY NAKSHATRA.R , AMIRTHA VARSHINI.N.J , KARUPPANA
HARI.S OF XII - A
5. SAMPLE OUTPUT

MAIN SCREEN :

NEW USER :
DISPLAY ALL CUSTOMERS:

SEARCH AN ACCOUNT:
OPEN NEW ACCOUNT:

DISPLAY ALL CUSTOMERS:


SEARCH A CUSTOMER :

WITHDRAW AMOUNT:
DEPOSIT AMOUNT :

VIEW BALANCE :
TABLE STRUCTURES :

Tables in ATM database:

Structure of Account table :

Structure of Customer table :


Structure of Withdrawals table :

Structure of Deposits table :

Sample run’s data :


6. CONCLUSION

An easy, understandable program for the user, an atm system can be created and
run as shown above. We've all become used to ATMs that have minimal
screens, hardware, and simple interfaces, such as small number pads with eight
buttons only. Then what will futuristic ATMs look like? Well, in reality the
ATMs of the future are already here. Long gone are the prevalence of simple,
single-function ATMs. Advances in technologies have allowed ATMs to follow
digital trends over the years. These days most ATMs have touch-screen
computers running on Microsoft's Windows 10. This means that they can utilize
facial recognition technology, remote video, and smartphone app integration. It
also means that as digital technology advances, ATM interfaces can follow suit
and evolve to become more and more user-friendly and increasingly multi-
functional. Creating an ATM machine program, we need to implement the four
fundamental concepts of each ATM system that exists, it includes cash
withdraw, cash deposit, account balance checks, and functionality for another
transaction or termination.
7. BIBLIOGRAPHY

1. BOOK REFERNCE – SUMITA ARORA


2. https://www.w3schools.com/python/python_mysql_getstarted.asp
3. https://www.freecodecamp.org/news/python-datetime-now-how-to-
get-todays-date-and-time/
4. https://www.w3schools.com/sql/sql_ref_drop_constraint.asp
5. https://www.scribd.com/document/417815101/Atm-Project
6. http://www.greencastleschool.in/page/banking-atm

You might also like