A fully object-oriented Banking System Simulator built using C# and .NET 9.
This project demonstrates real banking operations using models, interfaces, transaction services, validation helpers, DTOs, secure password hashing, and clean separation of concerns.
Perfect for backend portfolios, interview demonstrations, and OOP practice.
- Create customers with unique IDs
- Secure password hashing using IEncryptor
- Store multiple bank accounts per customer
- Retrieve account summaries with DTO
AccountNumAndBalance
- SavingsAccount
- CheckingAccount
Both inherit from the abstract BankAccount model.
Handled by the TransactionService:
- Deposit
- Withdraw
- Transfer between accounts
- Validation for amount and balance
- Auto-creation of transaction history entries
Each operation generates a Transaction model entry with:
- Timestamp
- Transaction type (stored as string)
- Amount
- Balance after operation
- Description
Supports indexers:
var firstTransaction = savingsAccount[0];BankSimulator/
├── BankSimulator.csproj
├── BankSimulator.sln
├── Program.cs
│
├── Interfaces/
│ ├── IBankAccount.cs
│ ├── IEncryptor.cs
│ └── ITransactionService.cs
│
├── Interfaces/Services/
│ ├── EncryptionService.cs
│ └── TransactionService.cs
│
├── Utilities/
│ └── InputValidator.cs
│
└── Models/
├── BankAccount.cs
├── CheckingAccount.cs
├── SavingsAccount.cs
├── Customer.cs
├── Transaction.cs
└── DTOs/
└── AccountNumAndBalance.cs
└── TypeEnums.cs
git clone cd BankSimulator dotnet build dotnet run
Welcome to the Bank Simulator!
Customers and Accounts Created!
💰 Basic Deposits and Withdrawals Completed!
🔄 Transfer Completed: 2000 from Savings → Checking
📊 Account Summaries for RaySha: 12345 → Balance: 6000 67890 → Balance: 2500
📜 Transaction History (RaySha Savings): TransactionDate : 2025-11-14 15:23:01, TransactionType : Deposit - Amount: 1000, BalanceAfter: 6000
- SOLID principles
- Interface-driven architecture
- Abstract inheritance (BankAccount → Checking/Savings)
- Clean service layer (TransactionService)
- Centralized validation using InputValidator
- DTO pattern
- Indexers in models
- Transaction recording
- Secure hash-based password management
- Proper separation of concerns