摘要
"多态"是面向对象程序设计方法中的重要概念,也是提高程序可扩充性的重要手段。然而初学面向对象编程的学生往往难以真正体会到其作用。文章介绍一个在教学中沿用多年,能够生动而充分地展示多态的作用,并在教学比赛中获奖的游戏编程教学案例,供大家参考。
Polymorphism is a very important concept in object oriented programming,and it's also a very important method to improve the program extensibility.But it's a little bit hard for the beginner to really understand the advantage of polymorphism.This article introduces a game programming sample,which can demonstrate the advantage of polymorphism vividly.And this teaching case won awards in some teaching contests.
出处
《计算机教育》
2011年第14期40-44,共5页
Computer Education
关键词
多态
可扩充性
虚函数
抽象类
polymorphism
extensibility
virtual function
abstract class