Project Class 12
Project Class 12
PROJECT REPORT ON
ROLL NO :
CLASS : XII – A1
PGT (CS)
JAMSHEDPUR
1
CERTIFICATE
entitled BANK
NEW DELHI.
2
Internal Examiner External Examiner
Date Date
3
TABLE OF CONTENTS [ T O C ]
1 ACKNOWLEDGEMENT
2 INTRODUCTION
4 PROPOSED SYSTEM
6 DATA DICTIONARY
7 MENU TREE
8 SOURCE CODE
9 SQL TABLES
10 OUTPUT
11 BIBLIOGRAPHY
4
ACKNOWLEDGEMENT
5
BANK MANAGEMENT SYSTEM
INTRODUCTION
The Bank class holds the bank’s data (clients, bank name) and
contains methods to update the list of clients and authenticate users
based on their name, account number, and password.The Client class
holds individual client details such as account number, balance, and
password. It also has methods to deposit, withdraw, and check the
balance.The main() function is the driver code that provides a menu
interface for the user to interact with the system.
6
OBJECTIVES OF THE PROJECT
7
PROPOSED SYSTEM
8
HARDWARE AND SOFTWARE REQUIREMENTS
ATHALON(3800+- 4200+
DUAL
CORE)
MSI
IX. Printer
SOFTWARE REQUIREMENTS:
• Windows OS
• Python
• MS WORD
9
Menu Tree
10
SOURCE CODE
FILENAME:PROJECT.PY
import csv
import sys
import random
# Database connection
password="mysql", database="data")
mycursor = mydb.cursor()
mycursor.execute('USE data')
def generate_transaction_id():
11
# USERS SECTION
def create_user():
print("Table created")
mycursor.execute("DESCRIBE user")
result = mycursor.fetchall()
for i in result:
print(i)
def entry_user():
while True:
user: "))
"))
12
qu = 'INSERT INTO user (bankid, name, email, age,
values = (a, b, c, d, e, f)
mycursor.execute(qu,
values) mydb.commit()
print("Account created")
if ch in "Nn":
break
def show_all_user():
result = mycursor.fetchall()
for i in result:
print(i)
def show_specific_user():
mycursor.execute(query, (ch,))
result = mycursor.fetchall()
for i in result:
print(i)
def age_user():
13
n = input("Enter lower limit age: ")
for x in mycursor:
print(x)
def Del_rec_user():
mydb.commit()
def update_user():
to skip): ")
update_fields = []
values = []
14
if name:
update_fields.append("name = %s")
values.append(name)
if email:
update_fields.append("email = %s")
values.append(email)
if age:
update_fields.append("age = %s")
values.append(int(age))
if bank_balance:
update_fields.append("bank_balance = %s")
values.append(float(bank_balance))
if pin:
update_fields.append("pin = %s")
values.append(pin)
if not update_fields:
return
bankid = %s"
values.append(a)
mycursor.execute(query, tuple(values))
mydb.commit()
15
print(f"Record with bankid {a} updated successfully.")
def view_transactions():
query = """
FROM transactions
"""
fw = csv.writer(file)
"amount", "remarks"])
t = mycursor.fetchall()
if t:
for i in t:
= i
16
transaction_type = "Sent" if from_bankid == b else
"Received"
Type: {transaction_type}")
amount, transaction_type])
else:
file.close()
def transaction_user():
transacted: "))
mycursor.execute(q)
"))
id1
17
mycursor.execute(q1)
a1 = mycursor.fetchone()[0]
f = a1 - amt1
mycursor.execute(q6)
a4 = mycursor.fetchone()[0]
if a4 == b:
bankid=%s" % id2
mycursor.execute(q4)
a2 = mycursor.fetchone()[0]
f2 = a2 + amt1
mycursor.execute(q2)
mydb.commit()
18
mycursor.execute(q3)
mydb.commit()
print("TRANSACTION SUCCESSFUL")
print("Your data:")
mycursor.execute(q5)
p = mycursor.fetchall()
for i in p:
print(i)
mycursor.execute(q7)
p1 = mycursor.fetchall()
for j in p1:
print(j)
transaction_id = generate_transaction_id()
(YYYY-MM-DD): ")
19
q8 = "INSERT INTO transactions (transaction_id,
date))
mydb.commit()
else:
print("Incorrect pin")
else:
# EMPLOYEES SECTION
def sorting():
print("Sort By:")
print("1. ID")
print("2. SALARY")
print("3. NAME")
if choice == 1:
elif choice == 2:
elif choice == 3:
else:
20
return
mycursor.execute(s)
results = mycursor.fetchall()
for i in results:
print(i)
def deptmembers():
details of")
print("1. Manager")
print("2. Sales")
print("3. HR")
print("4. Development")
if choice == 1:
elif choice == 2:
elif choice == 3:
elif choice == 4:
else:
return
21
mycursor.execute(s)
results = mycursor.fetchall()
for i in results:
print(i)
def emp_hike():
WHERE id = %s"
mydb.commit()
{salary_hike}%")
def emp_search():
result = mycursor.fetchall()
for i in result:
print(i)
def display():
22
q = "SELECT * FROM emp"
mycursor.execute(q)
result = mycursor.fetchall()
for i in result:
print(i)
def enter_emp():
while True:
values = (a, b, c, d, e)
mycursor.execute(qu, values)
mydb.commit()
if ch in "Nn":
break
def create_employee():
23
name VARCHAR(50) NOT NULL,
print("Table created")
mycursor.execute("DESCRIBE
emp") result =
mycursor.fetchall() for i in
result:
print(i)
while True:
print("3. Exit")
if choice == 1:
while True:
if user_choice == 1:
create_user()
elif user_choice == 2:
entry_user()
elif user_choice == 3:
show_all_user()
elif user_choice == 4:
show_specific_user()
elif user_choice == 5:
age_user()
elif user_choice == 6:
Del_rec_user()
elif user_choice == 7:
update_user()
elif user_choice == 8:
view_transactions()
elif user_choice == 9:
transaction_user()
break
else:
25
elif choice == 2:
while True:
Menu")
if emp_choice == 1:
create_employee()
elif emp_choice == 2:
enter_emp()
elif emp_choice == 3:
display()
elif emp_choice == 4:
emp_search()
elif emp_choice == 5:
sorting()
elif emp_choice == 6:
deptmembers()
elif emp_choice == 7:
emp_hike()
26
elif emp_choice == 8:
break
else:
elif choice == 3:
break
else:
27
SQL Tables in our program
Table User
Table emp
Table trancstions
28
OUTPUT
29
Account created Want to enter more records y/n: n
Enter your choice: 3
(9901, 'Aakash', '[email protected]', 30, Decimal('50000.00'), 1234)
(9902, 'Priya', '[email protected]', 28, Decimal('35000.00'), 5678)
(9903, 'Vikram', '[email protected]', 35, Decimal('60000.00'), 2345)
(9904, 'Neha', '[email protected]', 32, Decimal('45000.00'), 6789)
(9905, 'Rajat', '[email protected]', 27, Decimal('70000.00'), 1122)
Enter your choice: 4
Enter bankid to search: 9901
(9901, 'Aakash', '[email protected]', 30, Decimal('50000.00'), 1234)
Enter your choice: 5
Enter lower limit age: 25
Enter upper limit age: 30
(9901, 'Aakash', '[email protected]', 30, Decimal('50000.00'), 1234)
(9902, 'Priya', '[email protected]', 28, Decimal('35000.00'), 5678)
(9905, 'Rajat', '[email protected]', 27, Decimal('70000.00'), 1122)
30
Enter new pin (leave blank to skip): 5678
Transaction ID: 765432, From: 1002, To: 1003, Amount: 500, Date: 2024-12-18,
Type: Sent
Transaction ID: 123456, From: 1003, To: 1002, Amount: 250, Date: 2024-12-15,
Type: Received
TRANSACTION SUCCESSFUL
Your data:
31
***** MAIN MENU *****
1. Manage Users
2. Manage Employees
3. Exit
Enter your choice: 2
***** EMPLOYEE MENU *****
1. Create Employee Table
2. Enter Employee Details
3. Show All Employees
4. Search Employee by Name
5. Sort Employees
6. Department Members
7. Update Employee Salary
8. Back to Main Menu
Enter your choice: 1
Table created
('id', 'int(11)', 'NO', 'PRI', None, '')
('name', 'varchar(50)', 'NO', '', None, '')
('department', 'varchar(100)', 'NO', '', None, '')
('designation', 'varchar(100)', 'NO', '', None, '')
('salary', 'decimal(10,2)', 'NO', '', None, '')
32
Want to enter more records (y/n): n
Sort By:
1. ID
2. SALARY
3. NAME
33
Enter your choice: 6
1. Manager
2. Sales
3. HR
4. Development
1. Manage Users
2. Manage Employees
3. Exit
Exiting
34
BIBLIOGRAPHY
Websites
MySQL Documentation: https://dev.mysql.com/doc/
W3Schools: https://www.w3schools.com/python/
GeeksforGeeks: https://www.geeksforgeeks.org/
35