问题 单项选择题

以下关于面向对象方法中继承的叙述中,错误的是()。

A.继承是父类和子类之间共享数据和方法的机制

B.继承定义了一科-类与类之间的关系

C.继承关系中的子类将拥有父类的全部属性和方法

D.继承仅仅允许单重继承,即不允许一个子类有多个父类

答案

参考答案:D

解析:

本题考查面向对象技术的基本概念。

面向对象中,继承是父类和子类之问共享数据和方法的机制。它是类与类之间的一种关系,在定义和实现一个类的时候,可以在一个已经存在的类的基础上来进行,把这个已经存在的类所定义的内容作为自己的内容,并加入若干新的内容。

继承有两种分类方法:一种是从继承源上分类,可以分为单继承和多继承;另一种是从继承内容上分类,可以分为取代继承、包含继承、受限继承和特化继承。面向对象方法中可以存在多重继承的概念。

单项选择题 案例分析题
阅读理解

阅读理解

     Research has shown that music has an important effect on one's body and psyche (心灵). In fact,

there is a growing field of health care known as music therapy, which uses music to treat diseases. Even

hospitals are beginning to use music therapy. This is not surprising, as music affects the body and mind in

many powerful ways.

     Research has shown that quick music can make a person feel more alert, while slow music can

produce a calm, deep thinking state. Also, research has found that music can change brainwave activity

levels. This can help the brain to change speeds more easily on its own as needed, which means that

music can bring lasting benefits to your state of mind, even after you've stopped listening.

     Breathing and heart rates can also be influenced by music. This can mean slower breathing, slower

heart rate. This is why music and music therapy can help reduce the damaging effects of long-term stress,

greatly promoting (促进) not only relaxation, but health.

     Music can also be used to bring about a more positive state of mind by helping to keep worries away. Music has also been found to bring many other benefits, such as lowering blood pressure and reducing

the risk of strokes. It is no surprise that so many people are considering music as an important tool to

help the body become or stay healthy.

1. What can we infer about music therapy?

A. It is a type of music.

B. It is a research about music.

C. It is akind of musical effect on diseases.

D. It is the use of music method to help treat diseases.

2. According to the second paragraph, we can know that ________.

A. music with different speeds has different effects

B. quick music is not good for one's health

C. slow music can help one to think more calmly and slowly

D. music will have less benefit after one stops listening

3. The reason why music can help deal with stress is that ________.

A. it is used by many hospitals

B. it can help change brainwaves

C. it does good to breathing and heart rates

D. it can bring a more positive state of mind

4. According to the passage, music can help deal with all the following EXCEPT ________.

A. nervousness          

B. mind illnesses

C. strokes          

D. high blood pressure