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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# include "Book.h"
Book : : Book ( string bookname , Date data , bool bookislead , int times )
{
this - > BookName = bookname ;
this - > Data = data ;
this - > BookIsLend = bookislead ;
this - > Times = times ;
}
void Book : : ShowInfo ( )
{
cout < < " << " < < this - > BookName < < " >> " < < endl ;
if ( ! this - > BookIsLend ) {
cout < < " 状态: " < < " 在库 " < < endl ;
}
else {
cout < < " 状态: " < < " 借出 " < < endl ; //借出图书输出借出时间
cout < < " 借出时间: " < < this - > Data . ShowDate ( ) < < endl ;
}
cout < < " 借出次数: " < < this - > Times < < endl ;
cout < < endl ;
}
void Book : : Show_LoanTime ( )
{
cout < < " 借出时间: " < < this - > Data . ShowDate ( ) < < endl ;
}
void Book : : inTurnout ( ) //在借出操作中使用_pstu1替换后, 不需要再使用这个函数
{
if ( this - > BookIsLend = = false ) {
this - > BookIsLend = true ;
}
}
void Book : : outTurnin ( )
{
if ( this - > BookIsLend = = true ) {
this - > BookIsLend = false ;
}
}
void Book : : addTimes ( )
{
this - > Times + = 1 ;
}