-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTextBook.java
More file actions
70 lines (66 loc) · 1.46 KB
/
TextBook.java
File metadata and controls
70 lines (66 loc) · 1.46 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import java.io.Serializable;
public class TextBook implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private String title;
private String author;
private String publisher;
private Double price;
private Integer ISBN;
private Integer year;
public TextBook(String title, String author, String publisher,
Double price, Integer iSBN, Integer year) {
this.title = title;
this.author = author;
this.publisher = publisher;
this.price = price;
ISBN = iSBN;
this.year = year;
}
public TextBook(String title) {this.title = title;}
// Getters and setters
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
public Double getPrice() {
return price;
}
public void setPrice(Double price) {
this.price = price;
}
public Integer getISBN() {
return ISBN;
}
public void setISBN(Integer iSBN) {
ISBN = iSBN;
}
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
@Override
public String toString() {
return "TextBook [title=" + title + ", author=" + author
+ ", publisher=" + publisher + ", price=" + price + ", ISBN="
+ ISBN + ", year=" + year + "]";
}
}