面向对象方法的多形性及其应用  被引量:3

Polymorphism in Object-Oriented Method and Its Application

在线阅读下载全文

作  者:王萍[1] 张素琴[1] 

机构地区:[1]北京清华大学计算机系,北京100084

出  处:《计算机工程与应用》2001年第13期141-144,共4页Computer Engineering and Applications

摘  要:多形性是将多个意义赋予同一名字的能力。在面向对象方法中,运用多形性可以大大提高开发软件的效率和质量。该文首先介绍了多形性的几种表现形式,然后着重通过几个具体的例子说明如何利用面向对象编程语言C++中的虚函数机制来灵活运用多形性,最后对多形性的实质及不足之处作了探讨。Polymorphism is the ability of assigning multiple meanings to one name.While applying Object-Oriented technique,we can use polymorphism to improve the efficiency of software design and the quality of the software.This paper first introduces the different representation form of polymorphism in programming language,then explains how to take the advantage of polymorphism by using virtual function mechanism in C++ programming language.At the end of the paper,some discussions about the polymorphism's essential and shortage are presented.

关 键 词:多形性 面向对象 虚函数 程序设计方法 C++语言 

分 类 号:TP311.11[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象