Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔱 TITAN BANKING SUITE v1.0.4

    ████████╗██╗████████╗ █████╗ ███╗   ██╗
    ╚══██╔══╝██║╚══██╔══╝██╔══██╗████╗  ██║
       ██║   ██║   ██║   ███████║██╔██╗ ██║
       ██║   ██║   ██║   ██╔══██║██║╚██╗██║
       ██║   ██║   ██║   ██║  ██║██║ ╚████║
       ╚═╝   ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═══╝
    
         B A N K I N G   S U I T E
    ═══════════════════════════════════════
         Enterprise-Grade Financial System
         Powered by Advanced C++ Architecture

A Professional C++ Financial Simulation built on Production-Grade Object-Oriented Architecture

Titan Banking Suite is a console-based financial terminal that bridges the gap between theoretical OOP concepts and real-world software engineering. It demonstrates clean class design, persistent state management, role-based access control, and localized currency handling — the same principles that underpin enterprise banking systems.


📋 Table of Contents


🎯 Overview

Titan Banking Suite is a high-performance, console-based banking terminal that simulates real-world financial operations. It implements persistent state management, role-based access control, sophisticated error handling, and regional currency localization — going well beyond a standard academic demo.

Key Highlights

  • 100+ Customer Account Management with concurrent operation support
  • Persistent Data Storage via file-based serialization (titan_db.txt)
  • Admin Root Console with hidden privileged access for system audits
  • Indian Rupee Localization with Lakhs/Crores formatting via custom sstream logic
  • Secure Authentication with real-time PIN masking using <conio.h>
  • Defensive Input Validation preventing crashes, infinite loops, and buffer issues
  • Array of Objects database simulation for multi-account management

🏗️ Core OOP Concepts

1️⃣ Classes & Objects

class BankAccount {
    // Blueprint for every customer account in the system
    // Each user is instantiated as a discrete, independent object
};

The BankAccount class models a real-world bank account — binding together data (balance, PIN, account holder) and behaviour (deposit, withdraw, authenticate) into a single, coherent unit. Every customer in the system is a live instance of this class.


2️⃣ Encapsulation

private:
    double balance;        // Protected from unauthorized access
    string pin;            // Sensitive credential — never exposed
    string accountHolder;  // User data isolation

public:
    bool authenticate(string inputPin);  // Controlled access gateway
    void deposit(double amount);         // Safe, validated operation
    void withdraw(double amount);        // Enforces business rules

Critical data is locked behind private access modifiers. External code cannot directly touch a user's balance or PIN — it must go through authenticated public methods. This enforces business logic at the class level (e.g., no negative withdrawals, no unauthenticated balance reads).


3️⃣ Data Abstraction

The system exposes simple interfaces while hiding complex mechanics:

  • getMaskedPin() — hides terminal manipulation behind a single clean call
  • formatCurrency() — abstracts the full Indian numbering algorithm (Rupees → Thousands → Lakhs → Crores)
  • saveDatabase() / loadDatabase() — hides all file stream logic from the user-facing menu code

Users interact with a straightforward menu. The machinery running beneath it is invisible.


4️⃣ Array of Objects

BankAccount accounts[100];  // 100 independent customer objects in memory
int totalAccounts = 0;       // Tracks active count

// Accessing a specific object's method via index
accounts[i].deposit(amount);
accounts[i].authenticate(pin);

The system uses a static array of BankAccount objects to simulate an in-memory database. Index-based access mirrors how database systems use primary keys for lookups.


5️⃣ Inheritance & Polymorphism (Architecture Ready)

The class structure is designed for extension:

  • A base BankAccount class can be inherited by SavingsAccount, CurrentAccount, and SalaryAccount
  • Virtual functions allow each subclass to override transaction behaviour without touching core logic
  • This is the standard design pattern used in production banking software

⚙️ Key Functions & Implementation

createAccount()

Registers a new user — validates name, assigns a system-generated account number, accepts an initial deposit, and appends the new object to the active array.


authenticate(string inputPin)

bool BankAccount::authenticate(string inputPin) {
    return (pin == inputPin);  // Direct string comparison
}

Validates user credentials before any sensitive operation. Every deposit, withdrawal, and balance check is gated behind this function.


deposit(double amount) / withdraw(double amount)

Mutate the private balance field of a specific object. withdraw() includes an Insufficient Funds guard — if amount > balance, the operation is rejected and an error is displayed rather than allowing the balance to go negative.


getMaskedPin()

string getMaskedPin() {
    string p = "";
    char ch;
    while ((ch = _getch()) != '\r') {
        if (p.length() > 0 && ch == '\b') { p.pop_back(); cout << "\b \b"; }
        else { p += ch; cout << '*'; }
    }
    return p;
}

Uses <conio.h> to intercept raw keystrokes and replace each character with * in real time. Supports backspace correction. Note: _getch() is Windows-specific — a termios.h implementation would be used for POSIX/Linux portability.


saveDatabase() / loadDatabase()

void saveDatabase(BankAccount accounts[], int total) {
    ofstream outFile("titan_db.txt");
    outFile << total << endl;
    for (int i = 0; i < total; i++) {
        outFile << accounts[i].getAccountNumber() << " "
                << accounts[i].getPin() << " "
                << fixed << setprecision(2) << accounts[i].getBalance() << " "
                << accounts[i].getAccountHolder() << endl;
    }
    outFile.close();
}

Serializes the entire object array to a flat text file on exit, and reconstructs all objects from it on startup. This gives the system persistent state across reboots — a core requirement of any real banking system.


getValidInt() / getValidDouble()

int getValidInt() {
    int value;
    while (!(cin >> value) || cin.fail()) {
        cin.clear();
        cin.ignore(10000, '\n');
        cout << "Invalid input. Try again: ";
    }
    return value;
}

Defensive input wrappers that prevent the program from crashing or entering an infinite loop on bad input (letters, symbols, overflow values). All user-facing input goes through these functions.


formatCurrency(double amount)

Converts a raw double into Indian-formatted currency using stringstream:

Input:  2547850.50
Output: Rs. 25,47,850.50

Implements the Indian numbering convention (last 3 digits, then groups of 2) without relying on locale libraries.


Admin Root Console

Access: Hidden menu option (choice == 0)
Admin ID: AIX  |  Root PIN: 0219

└─ View System Liquidity & Stats
└─ View Complete Account Ledger
└─ Terminate Root Session

A privileged console that iterates through the entire accounts[] array to compute total system liquidity and display a full ledger — accessible only after a second authentication layer.


✨ Advanced Features

Feature Detail
PIN Masking Real-time * substitution via _getch() with backspace support
Insufficient Funds Guard Withdrawal rejection with error message before any balance mutation
Indian Currency Formatting Custom Lakhs/Crores formatter using sstream
Role-Based Access Separate user and root authentication flows
Persistent Storage Full object array serialized to titan_db.txt on exit
Input Validation Type-safe wrappers on all user-facing input
Account Deletion Removes object from array and shifts remaining entries

📂 System Architecture

┌─────────────────────────────────────────────────────┐
│         USER INTERFACE LAYER (Console)              │
│  ┌──────────────────────────────────────────────┐   │
│  │  Login Flow   │  Transaction Menu            │   │
│  │  Main Menu    │  Admin Root Console          │   │
│  └──────────────────────────────────────────────┘   │
└────────────────┬────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────┐
│      BUSINESS LOGIC LAYER (BankAccount Class)       │
│  ┌──────────────────────────────────────────────┐   │
│  │  deposit() / withdraw()                      │   │
│  │  authenticate()                              │   │
│  │  formatCurrency()                            │   │
│  │  getMaskedPin()                              │   │
│  └──────────────────────────────────────────────┘   │
└────────────────┬────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────┐
│      DATA LAYER (File Persistence)                  │
│  ┌──────────────────────────────────────────────┐   │
│  │  saveDatabase()   →  titan_db.txt            │   │
│  │  loadDatabase()   ←  titan_db.txt            │   │
│  └──────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────┘

Data Flow

Program Launch
    │
    ▼
loadDatabase() ──→ Read titan_db.txt ──→ Populate accounts[100]
    │
    ▼
User Authenticates ──→ authenticate() validates private PIN
    │
    ▼
Transaction Executes ──→ deposit() / withdraw() mutates object state
    │
    ▼
Program Exit ──→ saveDatabase() serializes full array to disk

🚀 Getting Started

Prerequisites

- Windows OS (primary — due to <conio.h> dependency)
- GCC/MinGW compiler (C++11 or later)
- VS Code with C/C++ extension (recommended)

Compile & Run

# Compile
g++ Titan_Banking_Suite.cpp -o titan -std=c++11

# Run
./titan

First Run

On first launch the system checks for titan_db.txt. If absent, it initializes a fresh database automatically. No manual setup required.


🔐 Access Credentials

Role ID PIN
Customer Account No. (assigned on registration) 4-digit PIN (set by user)
System Admin AIX 0219

⚠️ Admin credentials are hardcoded for demonstration purposes. In a production system, these would be hashed and stored securely outside the source code.


📊 Project Statistics

Metric Value
Language C++ (C++11 Standard)
Lines of Code ~2,000+ LOC
Max Accounts 100 concurrent objects
Database File titan_db.txt (~15–50 KB)
Compilation Time < 2 seconds
Memory Footprint ~50–100 KB (object array)
Platform Windows (Primary), Linux (Partial)
UI Mode Console-based interactive

🔮 Future Features

The following features are planned for future versions of Titan Banking Suite:

🔧 Technical Upgrades

Cross-Platform PIN Masking

Replace <conio.h> and _getch() with a termios.h-based implementation for full Linux and macOS compatibility. The masked input experience will remain identical — just portable.

Dynamic Account Capacity

Replace the fixed BankAccount accounts[100] array with a std::vector<BankAccount> to allow unlimited account creation without recompilation. Will include a configurable soft cap for resource control.

Hashed Credential Storage

Implement SHA-256 PIN hashing so credentials are never stored or compared in plaintext. Admin credentials will be moved from hardcoded values to an encrypted config file.

Input Sanitisation on File Load

Add field-level validation inside loadDatabase() — type checks, range guards, and a checksum line — to prevent crashes or data corruption if titan_db.txt is manually edited or partially corrupted.


🏦 Banking Features

Fund Transfers Between Accounts

Allow authenticated users to transfer a specified amount to another account number within the same system. Will include a confirmation step and double-debit protection.

Transaction History Per Account

Maintain a per-object log of every deposit, withdrawal, and transfer with a timestamp. Viewable from the user dashboard and exportable via the admin console.

Account Freeze / Suspension

Admin-controlled ability to freeze an account, preventing login and transactions without deleting the account record. Useful for fraud simulation scenarios.

Interest Calculation Engine

Add a calculateInterest() method that computes simple or compound interest based on account type (Savings vs. Current). Runs on admin-triggered cycle or at program startup.

Account Type Hierarchy (Inheritance)

Implement SavingsAccount, CurrentAccount, and SalaryAccount as subclasses of BankAccount. Each overrides transaction rules — e.g., savings accounts earn interest, current accounts allow overdrafts up to a limit.


🖥️ Interface & UX

Graphical User Interface (GUI)

Port the console UI to a proper windowed application using Qt or wxWidgets. Will preserve all backend logic — only the presentation layer changes.

Receipt Generation

After every transaction, generate a formatted .txt receipt file in the working directory with account number, transaction type, amount, and new balance.

Configurable Themes

Allow the console colour scheme and currency symbol to be set via a config.ini file — enabling localisation beyond Indian Rupees (e.g., USD, EUR, GBP).


⚡ Architecture

SQLite Database Backend

Replace the flat titan_db.txt file with an SQLite database for structured queries, indexing, and ACID-compliant transactions. Account lookups would move from linear scan to O(log n) indexed retrieval.

Multi-Threading

Introduce std::thread to allow concurrent transaction processing — simulating a real banking environment where multiple tellers operate simultaneously on the same ledger.

Client-Server Networking

Separate the system into a server process (holds the database and processes requests) and a client terminal (handles user I/O). Communication via TCP sockets using Winsock or POSIX sockets.

Blockchain-Style Audit Ledger

Implement an append-only transaction log where each entry contains a hash of the previous entry — making the audit trail tamper-evident and verifiable without a central authority.


📁 Project Structure

TITAN BANKING SUITE/
├── Titan_Banking_Suite.cpp      # Core source — all logic lives here
├── TITAN_BANKING_SUITE.exe      # Compiled Windows executable
├── titan_db.txt                 # Auto-generated persistent database
├── README.md                    # This file
└── .vscode/
    └── launch.json              # VS Code debug configuration

🏗️ OOP Concepts Coverage

Concept Status Where Used
Classes & Objects ✅ Implemented BankAccount class — full lifecycle
Encapsulation ✅ Implemented private balance, PIN, accountHolder
Data Abstraction ✅ Implemented getMaskedPin(), formatCurrency(), saveDatabase()
Array of Objects ✅ Implemented accounts[100] — in-memory database
File Handling ✅ Implemented fstream read/write via saveDatabase() / loadDatabase()
Input Validation ✅ Implemented getValidInt(), getValidDouble() wrappers
Inheritance 🔮 Planned SavingsAccount, CurrentAccount subclasses
Polymorphism 🔮 Planned Virtual processTransaction() override per account type

👥 Team & Credits

Role Name
Developer & Project Lead Harsh Kumar
Developer Govind Rao
Developer Ritik Patel

Institution: IILM University, Greater Noida
Course: Object-Oriented Programming with C++
Academic Role (Harsh Kumar): Secretary, E-Cell

Acknowledgments

  • IILM University Computer Science Department for guidance and infrastructure
  • The open-source C++ and MinGW communities for tooling
  • Classmates and peers for testing and feedback

📜 License & Usage

This project is released for educational purposes.

  • Permitted: Academic use, learning, modification, and extension
  • Prohibited: Commercial redistribution without explicit permission
  • 📋 Attribution: Credit the original authors and project if you build on it

📞 Contact

For questions, issues, or collaboration:

  • 📧 Email: [harshhjhha@gmail.com]
  • 🐛 Bug Reports: Document the exact steps to reproduce with input values and expected vs. actual output

╔═══════════════════════════════════════════════════════╗
║                                                       ║
║   TITAN BANKING SUITE — Enterprise Banking Solution  ║
║   Persistent. Secure. Always On.                     ║
║                                                       ║
║              Built with C++ and Precision            ║
║                                                       ║
║                    v1.0.4 (2026)                      ║
║                                                       ║
╚═══════════════════════════════════════════════════════╝

Last Updated: April 2026
Status: ✅ Active — v2.0 in planning Made By: github.com/hix-001

About

A professional C++ financial terminal featuring OOPS architecture, state persistence via file handling, and localized Indian currency formatting. Developed for academic presentation.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages