/
PolinaMakhrova
/
class5
Обзор
Документация
Войти
/
PolinaMakhrova
/
class5
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Book.java
38 строк
985 B
PolinaMakhrova
upload files
13 фев 2025, 07:32
13 фев 2025, 07:32
6c72de6
Код
Авторство
О чём код?
public class Book { public String title; public int releaseYear; public int pages; public String word; public Author1 author; //не понимаю, почему он не хочет брать параметр name из конструктора Author1 public Book(String title, int releaseYear, int pages, Author1 author) { Author1 author = new Author1("Иван", "Иванов", 8); } public boolean isBig() { if (pages > 500) { return true; } } public boolean matches( ) { if (name.contains(word) && surname.contains( word)) { return true; } else { return false; } } public int estimatePrice() { int prise = (int) Math.floor(pages * 3 * Math.sqrt(rating)); if (prise > 250) { return prise; } else { return 250; } }}