Computer Science Project
Computer Science Project
This is to certify that this project has been made by Nadia Wasey of class 12 th
Science-C on the topic “Bank Management System” (BMS) under the
guidance of Mr. Sarwar Sultan and has completed it successfully.
Supervisor
Acknowledgement
I would like to acknowledge my teacher Mr. Sarwar Sultan who gave me this
opportunity to do this project on “Bank Management System” (BMS).
I would also like to thank my parents and friends for their continuous guidance
and support and their valuable inputs have been very helpful in this project.
Nadia Wasey
XIIth Science-C
Overview
This project consists of a few classes such as Bank class, Account class and
Transaction class. Here, Bank contains a list of accounts and methods to add
and remove accounts and Account contains the account number, owner name,
balance, and methods to deposit, withdraw, and get the balance and Transaction
contains the transaction amount and type (deposit or withdrawal).
Contents
Certificate 1
Acknowledgement 2
Overview 3
Program to create Bank Class 5
Program to create Account Class 6
Program to create Transaction Class
Main Program
Output
Bibliography
Program to Create Bank Class
class Bank:
def __init__(self, name):
self.name = name
self.accounts = []
class Account:
def __init__(self, number, owner, balance):
self.number = number
self.owner = owner
self.balance = balance
self.transactions = []
class Transaction:
def __init__(self, amount, type):
self.amount = amount
self.type = type
Main Program
class Bank:
def __init__(self, name):
self.name = name
self.accounts = []
class Account:
def __init__(self, number, owner, balance):
self.number = number
self.owner = owner
self.balance = balance
self.transactions = []
class Transaction:
def __init__(self, amount, type):
self.amount = amount
self.type = type
def main():
bank_name = input('Enter bank name: ')
bank = Bank(bank_name)
print('Bank', bank_name, 'created successfully')
while True:
print('1. Create Account')
print('2. Deposit')
print('3. Withdraw')
print('4. Exit')
choice = int(input('Enter your choice: '))
if choice == 1.:
acc_number = input('Enter account number: ')
acc_owner = input('Enter account owner name: ')
acc_balance = float(input('Enter opening balance: '))
account = Account(acc_number, acc_owner, acc_balance)
bank.add_account(account)
print('Account created successfully')
elif choice == 2.:
acc_number = input('Enter account number: ')
amount = float(input('Enter amount to deposit: '))
account = find_account(bank.accounts, acc_number)
if account:
account.deposit(amount)
print('Deposit successful')
else:
print('Account not found')
elif choice == 3.:
acc_number = input('Enter account number: ')
amount = float(input('Enter amount to withdraw: '))
account = find_account(bank.accounts, acc_number)
if account:
account.withdraw(amount)
print('Withdrawal successful')
else:
print('Account not found')
elif choice == 4.:
print('Thank you for using the Bank Management System')
break
else:
print('Invalid choice')
if __name__ == '__main__':
main()
Output
a) Create a bank account
Enter bank name: ICICI Bank
Bank ICICI Bank created successfully
1. Create Account
2. Deposit
3. Withdraw
4. Exit
Enter your choice: 1
Enter account number: 3216785
Enter account owner name: steve
Enter opening balance: 50000
Account created successfully
b) Deposit money
1. Create Account
2. Deposit
3. Withdraw
4. Exit
Enter your choice: 2
Enter account number: 3216785
Enter amount to deposit: 100000
Deposit successful
c) Withdraw money
1. Create Account
2. Deposit
3. Withdraw
4. Exit
Enter your choice: 3
Enter account number: 3216785
Enter amount to withdraw: 1000
Withdrawal successful
d) Exit bank
1. Create Account
2. Deposit
3. Withdraw
4. Exit
Enter your choice: 4
Thank you for using the Bank Management System