public void PrintStatement(ITxHistory txHistory) { _console.PrintLine("date | credit | debit | balance"); foreach (var txRecord in txHistory.Transactions().OrderByDescending(tx => tx.Date)) { txRecord.Accept <TxRecord>(_txRecordPrinter); } }
public Account(ITxHistory txHistory, IStatementPrinter statementPrinter) { _txHistory = txHistory; _statementPrinter = statementPrinter; }