/
RodinaValentinaDI-25
/
LibraryRodina
Обзор
Документация
Войти
/
RodinaValentinaDI-25
/
LibraryRodina
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/main/java/org/example/Book.java
53 строки
1 KB
Val200ya
Unfinished task (boowomp)
25 сен 2024, 23:00
25 сен 2024, 23:00
5edfb7f
Код
Авторство
О чём код?
package org.example; public class Book { private String title; private String author; private String isbn; private int publicationYear; public Book(String title, String author, String isbn, int publicationYear) { this.title = title; this.author = author; this.isbn = isbn; this.publicationYear = publicationYear; } public String getTitle() { return title; } public String getAuthor() { return author; } public String getIsbn() { return isbn; } public int getPublicationYear() { return publicationYear; } public void setTitle(String title) { this.title = title; } public void setAuthor(String author) { this.author = author; } public void setIsbn(String isbn) { this.isbn = isbn; } public void setPublicationYear(int publicationYear) { this.publicationYear = publicationYear; } @Override public String toString() { return "Название книги: " + getTitle() + "\nАвтор: " + getAuthor() + "\nМеждународный " + "стандартный книжный номер: " + getIsbn() + "\nГод публикации: " + getPublicationYear(); } }