检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
出 处:《计算机工程与应用》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[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.7