studentcs.~c

来自「一次作业练习」· ~C 代码 · 共 29 行

~C
29
字号
#ifndef STUDENTCS_H
#define STUDENTCS_H

#include <fstream>
#include <string>
#include "Student.h"

class StudentCS : public Student
{
      public:
             StudentCS();//Constructing an empty StudentCS-object
             StudentCS(string n, int id); //has constructed an student-object with name = n, student_id = id, course1 = 0, course2 = 0
             void read(istream& fin);//read and stored the name and student-id and the credit points of course1 and course2
             void write(ostream& fout);//write a line containing the name, student_id and course1 and course 2
             void set_course1(int i); //set i as the value of course1
             void set_course2(int i);//set i as the value of course2
             int  get_course1();//get course1's value
             int  get_course2();//get course2's value

      private:
              int course1;
              int course2;


};


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?