/
advo_kitty
/
26.11.2025_Task6_light
Обзор
Документация
Войти
/
advo_kitty
/
26.11.2025_Task6_light
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Book.java
26 строк
663 B
advo_kitty
upload files
26 ноя 2025, 19:20
26 ноя 2025, 19:20
ef9426d
Код
Авторство
О чём код?
public class Book { private String title; private int releaseYear; private String author; private int pages; public Book(String title, int releaseYear, String author, int pages) { this.title = title; this.releaseYear = releaseYear; this.author = author; this.pages = pages; } public boolean isBig() { return pages > 500; } public boolean matches(String word) { return title.contains(word) || author.contains(word); } public int estimatePrice() { int price = 3 * pages; return Math.max(250, price); } }