|
|
|
|
#include <sstream>
|
|
|
|
|
#include "Graduate.h"
|
|
|
|
|
|
|
|
|
|
Graduate::Graduate(const std::string &id, const std::string &name, char sex, const std::string &identNumber,
|
|
|
|
|
const Date &birthday, int classId, const std::string &subject, const Teacher &adviser,
|
|
|
|
|
const Person &person) :
|
|
|
|
|
Student(id, name, sex, identNumber, birthday, classId), subject(subject), adviser(adviser), Person(person) {}
|
|
|
|
|
|
|
|
|
|
Graduate::Graduate(int classId, const Person &person, const std::string &subject, const Teacher &adviser) : Student(
|
|
|
|
|
classId, person), subject(subject), adviser(adviser), Person(person) {}
|
|
|
|
|
|
|
|
|
|
Graduate::Graduate(const Graduate &graduate) : subject(graduate.subject), adviser(graduate.adviser),
|
|
|
|
|
Student(graduate), Person(graduate) {}
|
|
|
|
|
|
|
|
|
|
std::string Graduate::toString() {
|
|
|
|
|
std::stringstream output;
|
|
|
|
|
output << Student::toString() << '\n'
|
|
|
|
|
<< "רҵ<EFBFBD><EFBFBD>" << subject << '\n'
|
|
|
|
|
<< "<EFBFBD><EFBFBD>ʦ<EFBFBD><EFBFBD>{ \n" << adviser.toString() << " \n}" << '\n';
|
|
|
|
|
|
|
|
|
|
return output.str();
|
|
|
|
|
}
|