检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:李强[1] 吴源[1] LI Qiang,WU Yuan(Economic Department,South China Normal University ZC College,Guangzhou 512000,China)
机构地区:[1]华南师范大学增城学院经济系,广东广州512000
出 处:《电脑知识与技术》2011年第5期3089-3091,共3页Computer Knowledge and Technology
摘 要:在面向对象程序设计中,继承性映射了现实世界中事物之间的层次现象,而多态性则是映射事物自身行为的多外延现象;虚函数可以实现不同的对象在收到相同的消息时,产生不同的动作。重载是同一对象在收到相同的消息时,产生不同的动作。该文对虚函数的多态性机制进行深入分析,提出用虚函数实现多态性的四项法则。In Object-Oriented Programming,the Inheritance reflects things of herarchical phenomenon in real world,but the Polymorphphism reflects the phenomenon of external multi-appearance of things itself.The virtual function can occur distinct motion by receiving same message in distinct objects.Overloading can occur distinct motion by receiving same message in same objects.This paper analyses deeply to the Polymorphphism and proposes four rules about the realization of Polymorphphism.
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.38