-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBook.java
More file actions
31 lines (31 loc) · 729 Bytes
/
Book.java
File metadata and controls
31 lines (31 loc) · 729 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
public class Book{
private String bookid;
private String title;
private String author;
private boolean isIssued;
public Book(String bookid, String title, String author){
this.bookid=bookid;
this.title=title;
this.author=author;
this.isIssued=false;
}
public String getBookId(){
return bookid;
}
public String getTitle(){
return title;
}
public String getAuthor(){
return author;
}
public boolean isIssued(){
return isIssued;
}
public void returnBook(){
isIssued=false;
}
@Override
public String toString(){
return bookid+" | "+title+"| "+author+" | Issued: "+isIssued;
}
}