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.
16 lines
533 B
16 lines
533 B
#include <sstream>
|
|
#include "Teacher.h"
|
|
|
|
Teacher::Teacher(const Person &person, const std::string &job, const std::string &department) :
|
|
Person(person), job(job), department(department) {}
|
|
|
|
Teacher::Teacher(const Teacher &teacher) : department(teacher.department), job(teacher.job), Person(teacher) {}
|
|
|
|
std::string Teacher::toString() {
|
|
std::stringstream output;
|
|
output << Person::toString() + '\n'
|
|
<< "²¿ÃÅ£º" << department << '\n'
|
|
<< "Ö°Îñ£º" << job;
|
|
|
|
return output.str();
|
|
} |