/
Pavel23
/
HW11
Обзор
Документация
Войти
/
Pavel23
/
HW11
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Account.java
18 строк
465 B
Pavel23
upload files
06 ноя 2025, 16:22
06 ноя 2025, 16:22
d0df674
Код
Авторство
О чём код?
public abstract class Account { protected long balance = 0; public abstract boolean add(long amount); public abstract boolean pay(long amount); public long getBalance() { return balance; } public boolean transfer(Account account, long amount) { if (account.add(amount) == true & this.pay(amount) == true) { account.add(amount); return true; } else return false; }; }