282                                                     10. 

 - 

1.    .

2.       
   .

3.    -  -
 .

10.1.  

        
:

class _ :

(public   protected I private) opc __
{

 
};

  class       struct, 
,    .     
  ()  -.   public,
protected  private    ,   
    .

  protected   ,    
 ,       ,    -
    (private).     
public Hprivate.

  ,     -
:

  student2.h

class student {
public:     // : , ,

//,, 
enum year { fresh, soph, junior, senior, grad };

student(char* nm, int id, double g, year x) ;

//, ,  , 
void print() const;

protected:

int student_id;                      // 
double gpa;                          // 
year ;                              // 
char name[30];                       //
};

   ,      
 .  ,     student,
 -,     ,  
 .       