/
2007chester
/
ProjectsNetology
Обзор
Документация
Войти
/
2007chester
/
ProjectsNetology
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Account.java
25 строк
553 B
2007chester
upload files
06 фев 2025, 20:35
06 фев 2025, 20:35
35d9084
Код
Авторство
О чём код?
public abstract class Account implements Transaction { public long balance; public Account(long balance) { this.balance = balance; } @Override public boolean transfer(Account account, long amount) { if (this.pay(amount)) { if (!account.add(amount)) { this.add(amount); return false; } return true; } else { return false; } } public long getBalance() { return balance; } }