-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBook.java
49 lines (43 loc) · 1.03 KB
/
Book.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* This interfaces with IBook.java has getter methods for each book's data attributes
*
* @author Sam Katerov
*/
public class Book implements IBook {
private String title;
private String authors;
private String isbn13;
public Book(String title, String authors, String isbn13) {
this.title = title;
this.authors = authors;
this.isbn13 = isbn13;
}
/**
* Returns the title of the book.
*
* @return title of the book
*/
@Override
public String getTitle() {
return title;
}
/**
* Returns a string that contains the authors of the book
* as a single string with different authors separated by /.
*
* @return author names as single string
*/
@Override
public String getAuthors() {
return authors;
}
/**
* Returns the 13 digit ISBN (ISBN13) that uniquely identifies this book.
*
* @return ISBN number of book
*/
@Override
public String getISBN13() {
return isbn13;
}
}