/
Ilshatt
/
Book
Обзор
Документация
Войти
/
Ilshatt
/
Book
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Book.java
24 строки
613 B
Ilshatt
upload files
07 июн 2025, 17:57
07 июн 2025, 17:57
64f7814
Код
Авторство
О чём код?
public class Book { String title; int releaseYear; String author; 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 author.contains (word) || title. contains (word); } public int estimatePrice() { int price = 3 * pages; return Math.max (250, price); } }