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.
34 lines
908 B
34 lines
908 B
#ifndef BOOK_H
|
|
#define BOOK_H
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include "Date.h"
|
|
|
|
using namespace std;
|
|
|
|
class Book
|
|
{
|
|
public:
|
|
Book(string bookname, Date data, bool bookislead, int times);//构造函数
|
|
void ShowInfo();//显示全部图书信息
|
|
void Show_LoanTime();//提供接口,输出图书借出时间
|
|
void inTurnout();//图书出库
|
|
void outTurnin();//图书入库
|
|
void addTimes();//借出次数加一
|
|
string getName() const { return BookName; }//外部访问接口,获取图书名称
|
|
Date& getDate() { return Data; }//外部访问接口,获取图书借出日期
|
|
bool getStatue() const { return BookIsLend; }//外部访问接口,获取图书状态
|
|
int getTimes() const { return Times; }//外部访问接口,获取图书借出次数
|
|
//virtual ~Book();
|
|
|
|
protected:
|
|
|
|
private:
|
|
string BookName;//书名
|
|
Date Data;//借出日期
|
|
bool BookIsLend;//图书是否在库
|
|
int Times; //借出次数
|
|
};
|
|
|
|
#endif // BOOK_H
|