Back to Projects

Programming Project

Banking Simulator - Multithreading / Synchronization

A Java banking simulation built to model concurrent transfers, shared account access, synchronization, and audit-style reporting in a multithreaded environment.

Overview

This project simulates a banking system where multiple threads interact with shared account data at the same time. The main challenge was making sure transfers remained correct and consistent even when many operations were happening concurrently.

Instead of treating it like a simple balance calculator, I approached it like a controlled concurrency problem. That meant thinking about lock ordering, synchronization, shared state, and how to prevent race conditions while still allowing realistic transaction activity.

Technologies Used

  • Java
  • Multithreading
  • Synchronization
  • Locks
  • Concurrent Programming

Core Features

  • Multiple simulated bank accounts with changing balances
  • Concurrent transfer operations between accounts
  • Synchronization to protect shared resources
  • Lock ordering to reduce the risk of deadlock
  • Audit-style snapshots and transaction visibility
  • Controlled thread behavior for repeatable testing

What This Project Demonstrates

  • Reasoning about thread safety in Java
  • Protecting shared data with synchronized access
  • Designing around race conditions and inconsistent state
  • Building a simulation that reflects real coordination problems

Design Focus

The most important part of this project was making sure money movement stayed valid under concurrency. That required careful handling of account access so two threads could not corrupt balances by reading or writing at the wrong time.

I also had to think through how to represent transactions clearly enough that the output remained understandable. A concurrency project can be technically correct but still hard to follow, so part of the work was making the behavior visible through structured output and audit information.

Project Screenshot

Output from the Java banking simulator project
Example output from the banking simulator showing synchronized transaction activity.

Challenges

The hardest part of this project was not just writing multithreaded code, but writing it in a way that stayed predictable enough to verify. Concurrent code can fail in ways that are hard to reproduce, so I had to be careful about structure, ordering, and visibility.

What I Learned

This project gave me a stronger understanding of how synchronization works in practice, why uncontrolled shared state is dangerous, and how small design decisions can have major effects on correctness in concurrent systems.

Skills Demonstrated

  • Java
  • Threads
  • Synchronization
  • Lock Ordering
  • Race Condition Prevention
  • Audit Visibility