Banking System Project
Banking System Project
- Create Account
- Deposit
- Withdraw
- Balance Inquiry
class BankAccount:
def __init__(self, owner):
self.owner = owner
self.balance = 0.0
def display_balance(self):
print(f"{self.owner}'s Balance: ${self.balance}")
def main():
print("Welcome to the Banking System")
name = input("Enter account holder name: ")
account = BankAccount(name)
while True:
print("\nOptions:")
print("1. Deposit")
print("2. Withdraw")
print("3. Balance Inquiry")
print("4. Exit")
choice = input("Choose an option: ")
if choice == '1':
amount = float(input("Enter amount to deposit: "))
account.deposit(amount)
elif choice == '2':
amount = float(input("Enter amount to withdraw: "))
account.withdraw(amount)
elif choice == '3':
account.display_balance()
elif choice == '4':
print("Thank you for using our banking system.")
break
else:
print("Invalid choice. Please try again.")
if __name__ == "__main__":
main()
Use Case Diagram
Flowchart