A terminal-based banking system built with pure Python OOP — no database, no external dependencies. All data lives in memory during the session.
banking-system/
├── main.py # Entry point — CLI menu
├── bank.py # Bank class — manages users in memory
├── user.py # User, Client, Admin classes
├── account.py # Account class — deposit / withdraw / balance
└── exceptions.py # Custom exceptions
User
├── Client → has one Account
└── Admin
Bank → manages a list of Users
- Create clients
- Create bank accounts per client
- Deposit and withdraw funds
- Check balance
- List all registered users
- Custom exception handling for all edge cases
python main.pyNo installation required — uses only the Python standard library.
| Concept | Where |
|---|---|
| Inheritance | Client, Admin extend User |
| Encapsulation | Bank._users is private; access via methods |
| Custom Exceptions | exceptions.py |
| Composition | Client contains an Account |
- This is a prototype — data is not persisted between runs.
- See the
databasebranch for the full version with MySQL persistence.