ifndef STUDENT_H define STUDENT_H include human class Student public H

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef STUDENT_H
#define STUDENT_H
#include <human.h>
class Student : public Human
{
public:
Student( const QString &name, const QDate &birthday ) :
Human( name, birthday ), mCourseNumber( 0 )
{ }
virtual ~Student() { /* did not survive the session */ }
quint8 courseNumber() const { return mCourseNumber; }
void moveToNextCourse() { ++mCourseNumber; }
virtual void prepareForSession() { doNothing(); }
virtual void doNothing() { }
protected:
quint8 mCourseNumber;
};
#endif // STUDENT_H