parent
8118fe4b49
commit
04e94eee15
@ -0,0 +1,24 @@
|
||||
package jichuti1;
|
||||
|
||||
/**
|
||||
* 图书类
|
||||
*/
|
||||
public class Book {
|
||||
private String bookId; // 图书ID
|
||||
private String title; // 书名
|
||||
private String author; // 作者
|
||||
private boolean isAvailable; // 是否可借
|
||||
|
||||
public Book(String bookId, String title, String author) {
|
||||
this.bookId = bookId;
|
||||
this.title = title;
|
||||
this.author = author;
|
||||
this.isAvailable = true;
|
||||
}
|
||||
|
||||
// getter和setter
|
||||
public String getBookId() { return bookId; }
|
||||
public String getTitle() { return title; }
|
||||
public boolean isAvailable() { return isAvailable; }
|
||||
public void setAvailable(boolean available) { isAvailable = available; }
|
||||
}
|
||||
Loading…
Reference in new issue