/
AleksejRo
/
5t.
Обзор
Документация
Войти
/
AleksejRo
/
5t.
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Book.java
36 строк
823 B
AleksejRo
upload files
12 июн 2025, 09:47
12 июн 2025, 09:47
8a874ec
Код
Авторство
О чём код?
public class Book { public String title; public int releaseYear; public String author; public 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() { if (pages > 500) return true; else return false; } public boolean matches(String word) { if (title.contains(word) || author.contains(word)) return true; else return false; } public int estimatePrice() { int price = 3 * pages; if (price < 250) return 250; else return price; } }