阅读下列说明和C++代码,将应填入 (n) 处的字句写在对应栏内。[说明]已知某类库

题型:填空题

问题:

阅读下列说明和C++代码,将应填入 (n) 处的字句写在对应栏内。

[说明]

已知某类库开发商提供了一套类库,类库中定义了Application类和Document类,它们之间的关系如图18-15所示,其中,Application类表示应用程序自身,而Document类则表示应用程序打开的文档。Application类负责打开一个已有的以外部形式存储的文档,比如一个文件,一旦从该文件中读出信息后,它就由一个Document对象表示。

当开发一个具体的应用程序时,开发者需要分别创建自己的Application和Document子类,例如图18-15中的类MyApplication和类MyDocument,并分别实现Application类和Document类中的某些方法。

已知Application类中的openDocument()方法采用了模板方法(Template Method)设计模式,该方法定义了打开文档的每一个主要步骤,如下所示。

(1)检查文档是否能够被打开,若不能打开,则给出出错信息并返回。

(2)创建文档对象。

(3)通过文档对象打开文档。

(4)通过文档对象读取文档信息。

(5)将文档对象加入到Application的文档对象集合中。

[C++代码]

#include<iostream>

#include<vector>

using namespace std;

C1ass Document

public:

void save()/*存储文档数据,此处代码省略*/

void open(string docName) /*打开文档,此处代码省略*/

void close() /*关闭文档,此处代码省略*/

virtual void read(String docName)=0;

class Appplication

private:

vector< (1) >docs; /*文档对象集合*/

public:

bool canopenDocument(String docName)

/*判断是否可以打开指定文档,返回真值时表示可以打开返回假时值表示不可打开,此处代码省略*/

void addDocument(Document *aD0cument)

/*将文档对象添加到文档对象集合中*/

docs.push_back( (2) );

virtual Document *doCreateDocument()=0;/*创建一个文档对象*/

void openDocument(string docName)/*打开文档*/

if( (3) )

cout<<"文档无法打开!"<<end1;

return;

(4) adoc= (5)

(6)

(7)

(8)

(5)处填()。

考点:计算机软件水平考试中级软件设计师软件设计师
题型:填空题

患者,女,52岁。颈前结喉右侧肿物 3cm×3cm×2cm,质地较硬,表面不光,不能随吞咽而上下移动,同时伴有局部疼痛,音哑,临床考虑为石瘿。行同位素131I扫描,其结果多是

A.温结节

B.热结节

C.冷结节

D.无改变

E.中性结节

题型:填空题

已知元素R的某种同位素的氯化物RClx为离子化合物,R离子核内中子数为y个,核外电子数为z个,则该同位素的符号应表示为(    )

A.

B.

C.

D.

题型:填空题

Ⅵ.阅读表达(共5小题;每小题2分,满分10分)

阅读下面短文,并根据短文后的要求答题。

Scientists have revealed(展示)the 10 commandments(法则)for a long and happy life. And the rules even allow for sunbathing, drinking alcohol and eating chocolate.

The first rule, as published in the New Scientist magazine, is to enjoy yourself.

Married

Second on the list is remaining sociable, with a happy marriage and good family life being essential for health.

Studies have shown that marriage can add as much as seven years to a man’s life and two years to a woman’s life.

A Drink

So called vices like wine, partying and chocolate provide the fourth rule, with countless studies showing that a little of what you fancy does you good rather than harm.

Work Your Brain

The fifth rule says that you should exercise your brain to stay active.

Last month scientists at Cambridge University said puzzles could help prevent a range of conditions, from depression to schizophrenia(精神分裂症).

Knitting, doing crosswords or just walking also help.

See the Doctor

It’s simple really. If you’re sick, get treatment fast .

Eat Healthily

As is well-known, you are what you eat.

Scientists have recommended that the low-fat, high-fiber Mediterranean diet is a model for healthy eating and a long life.

High in fruit and vegetables, the diet also uses beans ,breads and cereals.

Small amounts of meat and moderate amounts of fish are also eaten.

Take Risks

Rule eight urges people to put more excitement into their lives.

Intellectual challenges, traveling, or learning a new language can all        .

Embrace Technology

Rule nine advises those seeking a long life to embrace new technologies.

Be Happy

Rule ten is that you should smile and feel happier in life.

Research showed that older men with an optimistic(乐观的)attitude towards life were only half as likely to suffer from cardio-vascular disease心血管疾病)as those whose world view was more negative.(悲观的)

1. What’s the best title of the passage ?(Please answer within 10 words.)

2. Which sentence in the passage can be replaced by the following one?

Everybody knows that good health depends on a good diet.

3. Please fill in the blank in Rule 8 with proper words or phrases to complete the sentence. (Please answer within 10 words.)

4. Which of the suggestions do you think is the best for you ?Why ?(Please answer within 30 words .)

5. Translate the underlined sentence in the last paragraph into Chinese.

题型:填空题

肺性脑病的常见体征是()

A.球结膜充血和眼底视盘水肿

B.扑翼样震颤

C.抽搐和无意识动作

D.病理征阳性

E.木僵

题型:填空题

软件开发项目规模度量(size measurement)是估算软件项目工作量、编制成本预算、策划合理项目进度的基础。在下列方法中,______可用于软件的规模估算,帮助软件开发团队把握开发时间、费用分布等。

A.德尔菲法

B.V模型方法

C.原型法

D.用例设计

更多题库