选择题:阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。 [说明] 下面程序输出一个矩形面积,

  • 题目分类:软考初级
  • 题目类型:选择题
  • 查看权限:VIP
题目内容:
阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。

[说明]

下面程序输出一个矩形面积,以及矩形区域上的假想的作物产量。

[C++程序]

include <iostream.h>

class crop_assessment

{

int actual_crop;

int ideal_crop;

public:

void set(int in_actual,int in_ideal)

{

actual crop=in_actual;

ideal_crop=in_ideal;

}

int get_actual_crop(void){ (1) ;}

int get_ideal_crop(void){ (2) ;)

};

Class lot_size

{

int length;

int width;

(3) crop;

public:

void set(int 1,int w,int a,int i)

{

length=1;

width=w;

crop.set(a,i);

}

int get_area(void){return length*width;}

int get_data(void){return (4) ;}

int get_data2(void)freturn (5) ;}

}

int main()

{

Los_size small,medium;

small.set(5,5,5,25);

medium.set(10,10,10,50);

cout<<"For a small lot of area"<<smallget_area()<<“\n”;

cout<<"the actual crops are$"<<small.get_data2()<<"\n";

cout<<"and ideal crops are$”<<small.get_data()<<"\n";

cout<<"For a medium Lot of area"<<medium.get area()<<:\n”;

cout<<"the actual crops are$"<<medium.get_data2()<<"\n";

cout<<"and ideal crops are$"<<medium.get_data()<<"\n";

return 0;

}




参考答案:

被抽验者对药品检验机构的检验结果有异议而申请的检验属于

被抽验者对药品检验机构的检验结果有异议而申请的检验属于A.抽查检验 B.注册检验 C.指定检验 D.

查看答案

办理药品零售企业变更的是

办理药品零售企业变更的是A.国家食品药品监督管理局 B.省级食品药品监督管理部门 C.设区的市级药

查看答案

按问题1的地址分配方案,要求合法的IP网络,每个子网的主机数目最多可达多少?

按问题1的地址分配方案,要求合法的IP网络,每个子网的主机数目最多可达多少?

查看答案

第二类精神药品药品处方至少保存

第二类精神药品药品处方至少保存A.1年 B.2年 C.3年 D.5年 E.10年依照《麻醉药品和精神药品管理条

查看答案

可以凭处方向未成年人零售的药品品种是

可以凭处方向未成年人零售的药品品种是A.三唑仑 B.美沙酮 C.麦角新碱 D.苯巴比妥 E.地巴唑

查看答案