Skip to content

SoumyaShinde/Csharp_Bank_System_Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏦 BankSimulator — .NET C# Console Application

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.


🚀 Features

👤 Customer Management

  • Create customers with unique IDs
  • Secure password hashing using IEncryptor
  • Store multiple bank accounts per customer
  • Retrieve account summaries with DTO AccountNumAndBalance

🏦 Account Types

  • SavingsAccount
  • CheckingAccount

Both inherit from the abstract BankAccount model.

💰 Core Banking Operations

Handled by the TransactionService:

  • Deposit
  • Withdraw
  • Transfer between accounts
  • Validation for amount and balance
  • Auto-creation of transaction history entries

📜 Transaction History

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];

Project Structure

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

How to Run

git clone cd BankSimulator dotnet build dotnet run

Sample output

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

🧠 Concepts Demonstrated

  • 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

About

A C# console application simulating core banking operations including account management, transactions, and interest calculations. Features object-oriented design with interfaces and services architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages