package bank; public class Account { int id; double balance; Customer owner; public Account() { } public Account(int id, double initialDeposit, Customer owner) { this.id = id; this.balance = initialDeposit; this.owner = owner; } public double getBalance() { return balance; } public double deposit(double amount) { balance += amount; return amount; } public double withdraw(double amount) { if (balance > amount) { balance -= amount; return amount; } return 0; } public double transfer(double amount, Account another) { if (balance > amount) { balance -= amount; return another.deposit(amount); } return 0; } }