/
PolinaMakhrova
/
Class8
Обзор
Документация
Войти
/
PolinaMakhrova
/
Class8
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Book.java
31 строка
789 B
PolinaMakhrova
upload files
15 фев 2025, 09:42
15 фев 2025, 09:42
cdc37cd
Код
Авторство
О чём код?
public class Book { public String title; public int releaseYear; public int pages; Author1 author; public Book(String title, int releaseYear, int pages, Author1 author) { this.title = title; this.releaseYear = releaseYear; this.pages = pages; this.author = author; } public boolean isBig() {return pages > 500; } public boolean mathces (String word) { return author.name.contains(word)|| title.contains(word)||author.surname.contains(word);} public int estimatePrice() { int prise = (int) Math.floor(pages * 3 * Math.sqrt(author.rating)); if (prise > 250) { return prise; } else { return 250; } } }