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.

33 lines
955 B

package jinjieti1;
import java.io.Reader;
import java.time.LocalDate;
import jichuti1.Book;
/**
* 图书借阅历史类
*/
public class BorrowHistory {
private String historyId; // 历史记录ID
private jichuti1.Reader reader; // 借阅人
private Book book; // 借阅的图书
private LocalDate borrowDate; // 借出日期
private LocalDate returnDate; // 归还日期
public BorrowHistory(String historyId, jichuti1.Reader reader2, Book book, LocalDate borrowDate) {
this.historyId = historyId;
this.reader = reader2;
this.book = book;
this.borrowDate = borrowDate;
}
// 记录归还日期
public void returnBook(LocalDate returnDate) {
this.returnDate = returnDate;
}
// getter
public String getHistoryId() { return historyId; }
public String getBookTitle() { return book.getTitle(); }
}