A beginner-friendly, console-based Bank Management System written in C++. Built around a fictional Islamic Bank Limited (IBL), this project demonstrates core Object-Oriented Programming concepts in a clean, interactive terminal interface — perfect for students and beginners looking for a solid C++ portfolio project.
| Feature | Details |
|---|---|
| 🔐 Sign-Up & Login | Register with your name and a custom 4-digit PIN |
| 🆔 Auto Account Number | Unique IBL-XXXX-XXXX ID generated automatically on account creation |
| 🔄 Smart Menu | Option 1 automatically switches from "Add Account Details" → "Update Customer Information" after first setup |
| 💳 Transaction Area | Deposit and withdraw funds with real-time balance updates |
| 🛡️ PIN Verification | Required before any update or transaction — keeps your account secure |
| ✅ Input Validation | Enforces correct CNIC (13 digits), phone (10 digits), PIN (4 digits), and name length |
| 🖥️ Clean Interface | Centered headers, formatted sections, and smooth animated loading dots |
| 🚪 Logout & Re-Login | Logout returns you to the login screen without closing the app |
Launch App
│
▼
[ Account Registration ]
• Enter your name (min. 5 characters)
• Create a 4-digit PIN
│
▼
[ Login ]
• Enter registered name + PIN
│
▼
[ Dashboard ]
├─ [1] Add Account Details ← First time
│ └─ Auto-switches to →
│ [1] Update Customer Information ← After account is created (PIN required)
├─ [2] Display Customer Details
├─ [3] Transaction Operations ← PIN required
│ ├─ Deposit
│ └─ Withdraw (balance-checked)
├─ [4] Logout
└─ [5] Exit Application
Automatically creates a unique account number in the format IBL-XXXX-XXXX using random digits seeded from system time. No two sessions will produce the same number — no manual input required from the user.
When you first log in, Option 1 reads "Add Account Details". Once you fill in your information (name, CNIC, phone number), the system saves a flag internally. From that point forward, Option 1 permanently switches to "Update Customer Information" — and requires your PIN before allowing any changes.
Both the Update and Transaction sections require the user to enter their 4-digit PIN before proceeding. Incorrect PIN entries loop until the correct one is entered — no lockout, but no bypass either.
Handles both deposits and withdrawals:
- Deposit — adds any entered amount to the balance.
- Withdraw — validates that the requested amount does not exceed the current balance. Prompts again if the user tries to overdraw.
Three dedicated validators keep bad data out:
isValidCNIC()— exactly 13 numeric digitsisValidPhone()— exactly 10 numeric digitsisValidPIN()— exactly 4 numeric digits
Dynamically centers both the bank name (Islamic Bank Limited) and any section subtitle under a matching separator line — keeping the interface symmetrical regardless of the title length.
Deposit and withdrawal processing, account creation, and login each display an animated Please wait... sequence using Sleep() — giving the program a polished, real-world feel.
- Windows OS (uses
<windows.h>,<conio.h>, andsystem("CLS")) - Any C++ compiler: MinGW, MSVC (Visual Studio), or Dev-C++
Using g++ (MinGW):
g++ bank-management.cpp -o bank -std=c++17
./bankUsing Dev-C++:
Open the .cpp file → click Compile & Run (F11).
Using Visual Studio:
Create a new empty C++ project → add the .cpp file → build and run.
IBL-Console-Banking/
└── bank-management.cpp # Single-file program — everything in one place
- Object-Oriented Programming (Classes, structs, encapsulation)
- Input validation and buffer management (
cin.ignore) - Random number generation (
rand,srand,time) - Control flow with
switch, loops, and flags - String manipulation
- Console UI formatting and screen clearing
This project is Windows-only due to its use of:
<conio.h>— forgetch()(no-Enter keypress reading)<windows.h>— forSleep()(loading animations)system("CLS")— for clearing the console screen
Cross-platform support is a potential future improvement.
- CS/IT students submitting semester projects
- Beginners learning C++ OOP through a practical example
- Anyone wanting a simple, readable banking simulation to study or extend
This project is open source and free to use for educational purposes.
Made with ❤️ in C++ — Islamic Bank Limited Console System