55 lines
1.3 KiB
Java
55 lines
1.3 KiB
Java
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."
|
|
);
|
|
}
|
|
} |