Assume we are designing a typical bank account management system.
I would say let's not, because your question reveals that you don't know yet about the simplest accountancy, let alone about inter-bank transfers.
If all accounts are contained in the same bank, one could, for example, design a Customer class and a BankAccount class. The BankAccount class would have getBalance(), deposit(sum), withdraw(sum), and transfer(sum,targetAccount) methods.
No, not very close.
The most basic concepts of bookkeeping are a ledger, a journal, a calendar, an account-list, and debits and credits.
A ledger is a list of accounting entries. A journal links together entries which appear in the ledger and which form a single transaction. A calendar defines the available periods in which a transaction can occur. And the account-list defines the available accounts which a transaction can affect.
Amounts are recorded as either a debit or a credit. Debit and credit are opposites and follow the same arithmetic relationship as positive and negative numbers, but there is no rule about which one is treated as positive and which is treated as negative (often debits and credits are recorded and shown in separate fields, both as positive amounts, or if they are shown as a single net figure then the sign used to represent net debit or net credit is arbitrary and particular to context).
A single transaction always involves at least two entries being made into the ledger, affecting at least two accounts.
A deposit of cash by a client would lead to two entries in a ledger. A "cash on hand" account is debited (which in this context means cash is received), and a client account is credited (which means a debt is owed to that client).
A withdrawal of cash by a client would lead to cash being credited and the client account being debited.
A transfer between two client accounts would lead to the remitter's account being debited and the beneficiary's account being credited.
You'll notice I've fallen back into casually talking about the accounts being debited and credited. What I mean by this is an entry is made in the ledger, stating an amount and referencing an account.
None of the three operations belong to an individual account - which (in essence) is merely a reference number defined in the account-list.
In accountancy done on paper, these operations belong to the accounting clerk. A deposit? The clerk. A withdrawal? The clerk. A transfer? Again, the clerk.
In an application of a computer to accountancy and the conceiving of source code, where it may be regarded as convenient to think of the operations as occurring neither by the clerk using the computer nor by the computer as a whole, the most appropriate place for these operations would probably be the ledger, with a signature such as:
The difference between a deposit, withdrawal, or transfer, is not in the different operations which they involve - they all involve the same operation of making an accounting entry - but merely in the data which is entered (which accounts are referenced by the entry).
There's an important lesson here also about object-oriented modelling. Many things in the real world don't work the way software developers think they do - especially not software developers who have learned nothing about the professions they're writing software for.
There is a toxic theme in the schooling of many software developers, where they are encouraged to use only their imaginations for modelling, rather than studying and analysing specific professions or gaining real work experience.
How professionals think about things often doesn't involve the same concepts or relationships as object-oriented modellers tend to imagine, or even the same philosophy in which operations belong to particular kinds of "objects".
The only objects that exist in accountancy which actually do anything - which have operations - are the accountants. Everything else is static paperwork.
The accounts are not like little vending machines into which you insert cash into a slot or demand repayment by pressing a button, or where a transfer involves a little conveyor belt between two such vending machines. The accounts are simply reference numbers that help organise the ledger lines together.