CSC 216 F09/polymorphism: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]


==Place Title of Exercise Here==
==Polymorphism - Changing the Shape of Your Program==
 
Polymorphism is the ability of a subclass to define new or share functionality with a superclass.  A subclass automatically has possession of public and protected variables and methods in its superclass.  These inherited variables and methods can be called directly from an object of the subclass without having to change type.  It is possible to redefine variables and methods within a subclass.  This creates functionality.  In such a case, a variable or method with the same name defined in the subclass overrides the functionality with the same name of the superclass.
overload many forms


Polymorphism - Changing the Shape of Your Program


===The problem===
===The problem===

Revision as of 01:03, 10 November 2009

Jim Creager and Davis Dulin

Formatting Resources

Formatting Help Guide from MetaWiki

Polymorphism - Changing the Shape of Your Program

Polymorphism is the ability of a subclass to define new or share functionality with a superclass. A subclass automatically has possession of public and protected variables and methods in its superclass. These inherited variables and methods can be called directly from an object of the subclass without having to change type. It is possible to redefine variables and methods within a subclass. This creates functionality. In such a case, a variable or method with the same name defined in the subclass overrides the functionality with the same name of the superclass. overload many forms


The problem

Describe what you are attempting to teach students by this exercise.

Participants and props

How many students will participate? What else do you need (e.g., old tennis ball, Powerpoint slides, software).

The script

Describe how to do your exercise.