A comprehensive banking system that includes various account types such as BankAccount, SavingsAccount, and CheckingAccount. It supports deposits, withdrawals, and balance tracking, with added functionalities like interest calculation for savings and overdraft limits for checking accounts. The system is designed to manage accounts efficiently while maintaining a user-friendly interface."
- BankAccount: Basic banking functionalities such as deposit, withdrawal, and balance tracking.
- SavingsAccount: Inherits from BankAccount with the addition of interest rate and interest calculation.
- CheckingAccount: Inherits from BankAccount with overdraft limit functionality.
- Deposit and Withdraw: Handle deposits and withdrawals with error checking (e.g., insufficient balance, overdraft limit exceeded).
- Balance Management: Track the balance of each account and perform balance updates.
-
Clone this repository:
git clone https://github.com/your-username/bank-management-system.git
-
Navigate into the project directory:
cd bank-management-system
-
Ensure you have Python 3.x installed.
-
Run the
main.py
file to start using the banking system:python main.py
- Create instances of the
BankAccount
,SavingsAccount
, andCheckingAccount
classes. - Use the
deposit()
andwithdraw()
methods to modify account balances. - Call the
get_balance()
method to view the current balance. - For
SavingsAccount
, use thecalculate_interest()
method to calculate the interest.
# Example for BankAccount
account = BankAccount("123456", 1000)
account.deposit(500)
account.withdraw(200)
print(account)
# Example for SavingsAccount
savings_account = SavingsAccount("789012", 1000, 0.05)
print(savings_account)
print(f"Interest Earned: {savings_account.calculate_interest()}")
If you'd like to contribute to the project, feel free to fork the repository and submit a pull request with improvements or bug fixes.