|< < 15 > >|

Concurrency

Operations

  • Balance: Get the balance of an account.

  • Deposit: A customer deposits money into one of her accounts, either checking or savings.
    • amount > 0

  • Withdrawal: A customer withdraws money from one of his accounts, either checking or savings.
    • amount ≤ balance

  • Transfer: A customer transfers money from checking to savings, or in the other direction.
    • 0 < amount ≤ balance of the source account

  • Audit: The bank scans all accounts, computing the sum of all balances. (Matched against a record of deposits, withdrawals and transfers — not showing that detail.)

|< < 15 > >|