Code matches the use case text carefully (see references below).
Pay Bills use case scenario:
Algorithm (steps to implement the scenario):
1a) Source Account finds list of creditors
2a) Source Account loops creditors to find the sum owed
3a) Source Account verifies that its current balance is greater than the sum owed, and throws an exception if not
4a) Source Account loops creditors
4b) Make a MoneyTransfer of the amount owed to each creditor
|
|