In this project, you will build StockPulse, a multi-threaded stock trading application with a command-line interface. Unlike a single-threaded program, StockPulse models a trading system in which market data updates occur on background threads while user actions are processed concurrently. You will implement the core backend components of this concurrent trading system in Java. This includes immutable data objects, thread-safe wallet management, a concurrent market simulation, and a command-line interface that remains responsive during background updates.
Key concepts you will apply:
Java records: Modeling immutable data efficiently.
Concurrency: Managing background threads with ScheduledExecutorService.
Thread safety: Protecting shared resources using AtomicReference and synchronized blocks.
Functional interfaces: Decoupling components using consumers and lambdas.
Interactive CLI: Building a user-friendly console application with dynamic menus.
By the end of this project, you will have a working trading platform that can simulate market data, manage a secure wallet, execute real-time trades, and track portfolio performance.