Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bank.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Bank:
clients=[]
def __init__(self,name):
self.name=name
def add_client(self,client):
self.clients.append(client)
def authentication(self,name,account_number):
pass
def clients(self):
print(self.clients)

Binary file added bank_classdiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bank_usecase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class_diagrm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import random
class client:
def __init__(self,account_number,name,total_amount):
self.account_number=random(5)
self.name=name
self.total_amount=random(5)

def deposit(self):
amount = float(input("Enter amount to be deposited: "))
self.total_amount += amount
print("\n Amount Deposited:", amount)

def withdraw(self):
amount = float(input("Enter amount to be withdrawn: "))
if self.total_amount >= amount:
self.total_amount -= amount
print("\n You Withdraw:", amount)
else:
print("\n Insufficient balance ")

def balance(self):
print(self.total_amount)



21 changes: 21 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from bank import Bank
from client import client
class main(Bank):
bank=Bank("firdevs")
def loop(self):
while True:
temp = input(f"""This is 's account:
1) deposit
2) witdraw
3) get balance
""")
if temp == '1':
client.deposit()
elif temp == '2':
client.withdraw()
elif temp == '3':
client.balance()
else:
print("Please enter a valid option!")

a=main
Binary file added use_case.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.