-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBook.java
More file actions
53 lines (42 loc) · 1.15 KB
/
Book.java
File metadata and controls
53 lines (42 loc) · 1.15 KB
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
50
51
52
53
package onlineshop.merchandise;
import onlineshop.enums.Format;
import onlineshop.enums.Genre;
public class Book extends Article {
protected int pages;
protected String author;
protected Format format;
protected Genre genre;
public Book() {
super();
}
public Book(String title, String author) {
super();
this.title = title;
this.author = author;
}
public Book(String title, String author, String publisher, String genre, double price, String image) {
super("Description will follow...", publisher, price, image);
this.title = title;
this.author = author;
this.format = Format.PAPERBACK;
this.genre = Genre.fromString(genre);
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public int getPages() {
return pages;
}
public void setPages(int pages) {
this.pages = pages;
}
public void setFormat(Format format) {
this.format = format;
}
public void setGenre(Genre genre) {
this.genre = genre;
}
}