forked from kishanrajput23/Java-Projects-Collections
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBook.java
86 lines (63 loc) · 1.44 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package libraryApp;
public class Book {
private int isbn;
private String title;
private String author;
private String genre;
private int quantity;
private int checkedOut;
private int checkedIn;
//Constructor for book object
public Book(int isbn, String title, String author, String genre, int quantity, int checkedOut) {
this.isbn = isbn;
this.title = title;
this.author = author;
this.genre = genre;
this.quantity = quantity;
this.checkedOut = checkedOut;
this.checkedIn = quantity-checkedOut;
}
public int getCheckedIn() {
return checkedIn;
}
public void setCheckedIn(int checkedIn) {
this.checkedIn = checkedIn;
}
public void setIsbn(int isbn) {
this.isbn = isbn;
}
public void setTitle(String title) {
this.title = title;
}
public void setAuthor(String author) {
this.author = author;
}
public void setGenre(String genre) {
this.genre = genre;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public void setCheckedOut(int checkedOut) {
this.checkedOut = checkedOut;
}
//Getter Methods
public int getIsbn() {
return isbn;
}
public String getTitle() {
return title;
}
public String getAuthor() {
return author;
}
public String getGenre() {
return genre;
}
public int getQuantity() {
return quantity;
}
public int getCheckedOut() {
return checkedOut;
}
}