/
Letta21
/
HWAbstrInheritance
Обзор
Документация
Войти
/
Letta21
/
HWAbstrInheritance
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
SimpleAccount.java
32 строки
695 B
Letta21
Homework3
01 окт 2025, 18:09
01 окт 2025, 18:09
927013d
Код
Авторство
О чём код?
public class SimpleAccount extends Account { @Override public boolean add(long amount) { if (amount > 0) { this.amount += amount; return true; } else { return false; } } @Override public boolean pay(long amount) { if (this.amount >= amount) { this.amount -= amount; return true; } else { return false; } } @Override public void getBalance() { super.getBalance(); } @Override public boolean transfer(Account account, long amount) { return super.transfer(account, amount); } }