You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
712 B
24 lines
712 B
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; }
|
|
} |