文件名称:duotai
介绍说明--下载内容均来自于网络,请自行研究使用
多态和虚函数
1.编写一个评选优秀教师和学生的程序,优秀教师的标准是一年内发表论文3篇以上,优秀学生的标准是考试平均成绩在90分以上,当输入一系列的教师和学生后,列出优秀教师和学生的名单。
实验原理:设计一个基类,其中包含描述姓名的数据成员、判定是否优秀的纯虚函数;由此派生出教师类和学生类,教师类中增添表示论文数的数据成员、重载判定是否优秀的成员函数,学生类中增添表示平均成绩的数据成员、重载判定是否优秀的成员函数。
-Polymorphism and virtual functions 1. To prepare a selection of outstanding teachers and students of the procedures, standards of outstanding teachers is a year more than three papers, the best students to the examination of the standard is an average score of 90 points or more, when the importation of a wide range of teachers and students, the list of outstanding teachers and lists of students. Experimental principle: to design a base class, which includes descr iption of the data member name, to determine whether the best pure virtual function resulting derived category of teachers and students in class, teacher class paper added that the number of data members, heavy-duty to determine whether the outstanding member functions, the students added that the average class performance data member, heavy-duty members to determine whether the excellent function.
1.编写一个评选优秀教师和学生的程序,优秀教师的标准是一年内发表论文3篇以上,优秀学生的标准是考试平均成绩在90分以上,当输入一系列的教师和学生后,列出优秀教师和学生的名单。
实验原理:设计一个基类,其中包含描述姓名的数据成员、判定是否优秀的纯虚函数;由此派生出教师类和学生类,教师类中增添表示论文数的数据成员、重载判定是否优秀的成员函数,学生类中增添表示平均成绩的数据成员、重载判定是否优秀的成员函数。
-Polymorphism and virtual functions 1. To prepare a selection of outstanding teachers and students of the procedures, standards of outstanding teachers is a year more than three papers, the best students to the examination of the standard is an average score of 90 points or more, when the importation of a wide range of teachers and students, the list of outstanding teachers and lists of students. Experimental principle: to design a base class, which includes descr iption of the data member name, to determine whether the best pure virtual function resulting derived category of teachers and students in class, teacher class paper added that the number of data members, heavy-duty to determine whether the outstanding member functions, the students added that the average class performance data member, heavy-duty members to determine whether the excellent function.
相关搜索: duotai
(系统自动生成,下载前可以参看下载内容)
下载文件列表
duotai.doc