10.1.                                                   283

, ,  .    -
  grad_student    student,   .

  student2.h

class grad_student : public student {
public:   //  :

// ,  , , 
enum support ( ta, ra, fellowship, other };

grad_student( char* nm, int id, double g,
year x, support t, char* d, char* th) ;

//t    ,
//d  , th   
void print() const;

protected:

support s;          //  
char  dept[10];      //
char  thesis[80];    // 
};

   grad_student   , a student  . -
       publ ic,  
, ,     (protected  public)  
student        grad_student.
      .  -
  ,    grad_student  
student. To    ,     
 .      ISA'.  
    (interface inheritance).

     ;   -
     .     -
,      - operator^ (). , 
   grad_student     student:

student_id, gpa, name,   print ().      -
       .      
grad_student,        
- print ().    (override).  -
 student: : print ()  grad_student: .-print ()    
.      -, -
   .       ,   -
           .

   

   .  grad_student  -
,    student.

'  ISA ( is-a)    .   -
  ()  grad_student    () 
student.  . .