25 lines
631 B
C++
25 lines
631 B
C++
#ifndef EXAMPLE25_ASSISTANT_H
|
|
#define EXAMPLE25_ASSISTANT_H
|
|
|
|
#include <iostream>
|
|
|
|
class Assistant : public Person {
|
|
//class Assistant : public virtual Person {
|
|
protected:
|
|
std::string faculty;
|
|
std::string subject;
|
|
public:
|
|
Assistant(std::string n, std::string f, std::string s) : Person(n), faculty(f), subject(s) {
|
|
}
|
|
virtual ~Assistant() {
|
|
}
|
|
virtual void print() const {
|
|
std::cout << "Assistant: " << name << " " << faculty << " " << subject << std::endl;
|
|
}
|
|
virtual std::string department() const {
|
|
return faculty;
|
|
}
|
|
};
|
|
|
|
#endif //EXAMPLE25_ASSISTANT_H
|