Encapsulation · checked exceptions · transaction ledger · freeze/transfer
| Type | Amount | Balance | Note | Time |
|---|
# compile cd _projects/bank-account/src javac *.java # run full demo java Main ── 1. Opening Accounts ────────────────────────────────────── ✓ Alice opened: BankAccount{id='A1B2...', owner='Alice', balance=1000.00, ...} ✓ Bob opened: BankAccount{id='C3D4...', owner='Bob', balance=0.00, ...} ── 3. Withdrawals + InsufficientFundsException ───────────── ⚠ Caught InsufficientFundsException: ⚠ Attempted : $500.00 ⚠ Available : $200.00 ⚠ Shortfall : $300.00 ── 5. Full Transaction History / Statement ────────────────── ACCOUNT STATEMENT — EVE [ID: 7E87...] [2026-04-24 06:31:26] OPENING 1000.00 Balance: 1000.00 [2026-04-24 06:31:26] DEPOSIT + 500.00 Balance: 1500.00 (freelance invoice) [2026-04-24 06:31:26] WITHDRAWAL - 120.00 Balance: 1380.00 (utilities) ...