feat: add advanced multithreading banking system skeleton

This commit is contained in:
2026-06-03 16:48:39 +03:30
parent 1b38f250e5
commit ac35c817ee
7 changed files with 250 additions and 0 deletions
@@ -0,0 +1,55 @@
package dev.banking;
import dev.banking.service.BankingSystem;
/**
* Creates a ready-to-run demonstration environment.
*
* Students do not need to modify this class.
*/
public final class DemoFactory {
private DemoFactory() {
}
/**
* Builds a fully configured banking simulation system.
*
* This includes:
* - Bank accounts
* - Transaction stream generator / loader
* - ExecutorService (thread pool)
* - Transaction processor
* - Live monitoring system
*
* @return configured BankingSystem instance
*/
public static BankingSystem createDemoSystem() {
/*
* TODO (Instructor Implementation Only)
*
* Example responsibilities:
*
* 1. Create bank accounts:
* - Account(1, 1000)
* - Account(2, 2000)
* - Account(3, 1500)
*
* 2. Create transaction list or stream
*
* 3. Initialize ExecutorService:
* Executors.newFixedThreadPool(n)
*
* 4. Create TransactionProcessor
*
* 5. Create BankingSystem and inject dependencies
*
* 6. Attach LiveMonitor (optional)
*/
throw new UnsupportedOperationException(
"Instructor implementation required."
);
}
}