29 lines
623 B
C++
29 lines
623 B
C++
|
#include "Colleague.h"
|
|||
|
#include "Mediator.h"
|
|||
|
|
|||
|
Landlord::Landlord(){
|
|||
|
name = "none";
|
|||
|
price = 0;
|
|||
|
address = "none";
|
|||
|
phoneNumber = "none";
|
|||
|
setPersonType(NONE_PERSON);
|
|||
|
}
|
|||
|
|
|||
|
Landlord::Landlord(string iName, int iPrice,
|
|||
|
string iAddress, string iPhoneNum){
|
|||
|
name = iName;
|
|||
|
price = iPrice;
|
|||
|
address = iAddress;
|
|||
|
phoneNumber = iPhoneNum;
|
|||
|
setPersonType(LANDLORD);
|
|||
|
}
|
|||
|
|
|||
|
void Landlord::answer(){
|
|||
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%s, <20><><EFBFBD>⣺%d, <20><>ַ<EFBFBD><D6B7>%s, <20><>ϵ<EFBFBD>绰<EFBFBD><E7BBB0>%s\n",
|
|||
|
name.c_str(), price, address.c_str(), phoneNumber.c_str());
|
|||
|
}
|
|||
|
|
|||
|
void Landlord::ask(){
|
|||
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>%s<>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>\n",name.c_str());
|
|||
|
(this->getMediator())->operation(this);
|
|||
|
}
|