在面向对象技术中,不同的对象在收到同一消息时可以产生完全不同的结果,这一现象称为多态,它由( )机制来支持。利用类的层次关系,把具有通用功能的消息存放在高层次,而不同的实现这一功能的行为放在较低层次,在这些低层次上生成的对象能够给通用消息以不同的响应。
- A.绑定
- B.继承
- C.消息
- D.多态
正确答案及解析
正确答案
解析
多态性是同一操作作用于不同的类的实例,将产生不同的执行结果,即当不同类的对象收到相同的消息时,得到不同的结果。在运行时,可以通过指向基类的指针,来调用实现派生类中的方法。多态是面向对象程序设计的重要特征之一,是扩展性在“继承”之后的又一重大表现。如果一个语言只支持类而不支持多态,只能说明它是基于对象的,而不是面向对象的。
包含此试题的试卷
你可能感兴趣的试题
Advancements in ( )have contributed to the growth of the automotive industry through the creation and evolution of self-driving vehicles.
-
- A.Artificial Intelligence
- B.Cloud Computing
- C.Internet of Things
- D.Big Data
- 查看答案
In project human resource management , ( )is not a source of power for the project manager.
-
- A.referent power
- B.expert power
- C.reward power
- D.audit power
- 查看答案
At the project establishment stage , the feasibility study mainly includes techinical feasibility analysis , ( ), operation environment feasibility analysis and other aspects of feasibility analysis.
-
- A.detail feasibility analysis
- B.opportunity analysis
- C.economic feasibility analysis
- D.risk analysis
- 查看答案
( )is a grid that shows the project resources assigned to each work package.
-
- A.Stakeholder engagement assessment matrix
- B.Requirements traceability matrix
- C.Probability and impact matrix
- D.Responsibility assignment matrix
- 查看答案
Xinhua News Agency reported in January 2022,Chian will further promote the developmet of a digital economy during the 14th Five-Year Plan eriod(2021-2025). The plan also emphasized industrial ( )transformation.
-
- A.digital
- B.networking
- C.intelligentize
- D.informatization
- 查看答案