public void transfer(double amount, BankAccount other) { balance = balance - amount; other.balance = other.balance + amount; }
public void deposit(double amount) { if (amount < 0) System.out.println("Bad value"); . . . }