问题 单项选择题 共用题干题

患者男性,24岁,因牙面上横纹就诊,查体:双侧牙冠表面见带状凹陷,探针可深入。

可推断致病因素出现时间为()

A.1岁

B.2岁

C.3岁

D.4岁

E.5岁

答案

参考答案:A

问答题

请使用“答题”菜单或使用VC6打开考生文件夹proj2下的工程proj2。此工程定义了一个人员类Person,然后派生出学生类Student和教授类Professor。请在程序中的画线处填写适当的代码,然后删除横线,以实现上述定义。此程序的正确输出结果应为:
My name is Zhang.
my name is Wang and my G.P.A.is 3.88
My name is Li,I have 8 publications..
注意:只能在画线处填写适当的代码,不要改动程序中的其他内容,也不能删除或移动“//************found************”。
//源程序
#include <iostream>
using namespace std;
class Person
public:
//************found************
______name=NULL;
Person(char*s) name=new char[strlen(s)+1];strcpy(name,s);
~Person() if(name!=NULL) delete[]name;
//************found************
______Disp() cout<<"My name is"<<name<<".\n"; //声明虚函数
void setName(char*s) name=new char[strlen(s)+1];strcpy(name,s);
protected:
char*name:

class Student: public Person
public:
//************found************
Student(char*s,double g)______
void Disp() cout<<"my name is"<<name<<"and my G.P.A.is il<<gpa<<".\n";
private:
float gpa;

class Professor: public Person
public:
void setPubls(int n)publs=n;
void Disp() cout<<"My name is"<<name<<",I have"<<publs<<"publications.\n";
private:
int publs;

int main()
//************found************
______;
Person x("Zhang");
p=&x;p->Disp();
Student y("Wang",3.88);
p=&y;p->Disp();
Professor z:
z.setName("Li");
z.setPubls(8);
p=&z;p->Disp();
return 0:

单项选择题