This project demonstrates an advanced Python implementation of a Bank Management System using Object-Oriented Programming (OOP) principles. The system allows users to create different types of bank accounts, deposit and withdraw money, view account details, and apply interest to savings accounts. It illustrates key OOP concepts such as inheritance, polymorphism, encapsulation, and exception handling.
This project simulates a simple bank management system where users can perform operations on different types of accounts: Checking Account and Savings Account. Each account type has specific behaviors, such as adding interest for savings accounts, and adheres to a common interface defined by an abstract base class.
The system is designed to demonstrate core OOP principles in Python, making it an excellent reference for those learning or teaching object-oriented design.
BankAccount
): Defines a common interface for all types of bank accounts.CheckingAccount
): Allows deposits and withdrawals with basic functionality.SavingsAccount
): Supports deposits, withdrawals, and interest calculation.No external packages are required for this project.
Clone the Repository:
Clone the repository to your local machine:
git clone https://github.com/your-username/bank-management-system.git
Navigate to the Directory:
Go to the project directory:
cd bank-management-system
Run the Script:
Run the script using Python:
python bank_management_system.py
When you run the script, it will:
CheckingAccount
and SavingsAccount
.Running the script will produce output similar to:
=== Checking Account Details ===
Account Number: CHK12345, Account Holder: John Doe, Balance: 500.00
Deposited $200.00 to Checking Account.
Withdrew $150.00 from Checking Account.
Updated Balance: 550.0
=== Savings Account Details ===
Account Number: SAV67890, Account Holder: Jane Doe, Balance: 1000.00
Deposited $300.00 to Savings Account.
Withdrew $100.00 from Savings Account.
Added interest of $36.00 to Savings Account.
Updated Balance: 1236.0
To add a new type of bank account, you can create a new class that inherits from BankAccount
and implement the required methods (deposit
and withdraw
). For example:
class BusinessAccount(BankAccount):
# Implement deposit and withdraw methods specific to BusinessAccount
pass
Contributions are welcome! If you have ideas for new features, improvements, or bug fixes, please feel free to open an issue or create a pull request.
git clone https://github.com/your-username/bank-management-system.git
git checkout -b feature/your-feature-name
git commit -m "Add: feature description"
git push origin feature/your-feature-name
This project is licensed under the MIT License - see the LICENSE file for details.
Thank you for using the Bank Management System! If you have any questions or feedback, feel free to reach out. Happy coding! ๐