-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBooks.java
More file actions
44 lines (34 loc) · 733 Bytes
/
Books.java
File metadata and controls
44 lines (34 loc) · 733 Bytes
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
class Books {
private String title;
private String genre;
private int pageCount;
private boolean checkedIn = true;
public Books(String title, String genre, int pageCount) {
this.title = title;
this.genre = genre;
this.pageCount = pageCount;
}
public String getTitle() {
return title;
}
public String getGenre() {
return genre;
}
public int getPageCount() {
return pageCount;
}
public boolean isCheckedIn() {
return checkedIn;
}
public void checkOut() {
checkedIn = false;
}
public void checkIn() {
checkedIn = true;
}
@Override
public String toString() {
return "Books [title=" + title + ", genre=" + genre + ", pageCount=" + pageCount + ", checkedIn=" + checkedIn
+ "]";
}
}