CSC 216/s08/strive for happiness: Difference between revisions
No edit summary |
|||
Line 2: | Line 2: | ||
[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] | ||
== | ==What is Polymorphism?== | ||
===The problem=== | ===The problem=== | ||
Describe what you are attempting to teach students by this exercise. | Describe what you are attempting to teach students by this exercise. | ||
<p>Polymorphism is derived from Greek, meaning "many forms". Therefore, in Java, polymorphism is using a super class variable to refer to a subclass object, the "many forms" of the super class variable. It is useful because interfaces and inheritance to be used more abstractly.</p> | |||
<p>A game of "Let's Make A Deal" would be played.</p> | |||
<p>2 teams would see a walk-through of 1 person going through the motions of choosing a door and seeing what's behind each of the doors.</p> | |||
<p>Then each team would be given lines of code to order correctly....or.....each team would attempt to write the code in order to make the walk-through work in a specified/requested fashion from the Powerpoint slide listed on the overhead.</p> | |||
===Participants and props=== | ===Participants and props=== | ||
The whole class would participate and be divided into 2 teams. | |||
<p>5 students would participate in the front of the class.</p> | |||
<p>Teams would be vying for "the prize". Incentive might be a victory trophy (cans of soda, candy bars, 1 extra point on the exam or homework).</p> | |||
<p>Props would 8.5" x 11" paper with writing on it.</p> | |||
<p>4 students would be each be holding 3 pieces of paper: 1 with a number on the "door" and another with code on it. The code would be hidden behind the "door numbered" piece of paper. The code would list the animal type. The last piece of paper would be a method.</p> | |||
What else do you need (e.g., old tennis ball, Powerpoint slides, software). | |||
<p>There may be a Powerpoint slide still up on the screen with the rules listed as a reminder.</p> | |||
===The script=== | ===The script=== | ||
Describe how to do your exercise. | Describe how to do your exercise. |
Revision as of 06:01, 23 March 2008
Formatting Resources
Formatting Help Guide from MetaWiki
What is Polymorphism?
The problem
Describe what you are attempting to teach students by this exercise.
Polymorphism is derived from Greek, meaning "many forms". Therefore, in Java, polymorphism is using a super class variable to refer to a subclass object, the "many forms" of the super class variable. It is useful because interfaces and inheritance to be used more abstractly.
A game of "Let's Make A Deal" would be played.
2 teams would see a walk-through of 1 person going through the motions of choosing a door and seeing what's behind each of the doors.
Then each team would be given lines of code to order correctly....or.....each team would attempt to write the code in order to make the walk-through work in a specified/requested fashion from the Powerpoint slide listed on the overhead.
Participants and props
The whole class would participate and be divided into 2 teams.
5 students would participate in the front of the class.
Teams would be vying for "the prize". Incentive might be a victory trophy (cans of soda, candy bars, 1 extra point on the exam or homework).
Props would 8.5" x 11" paper with writing on it.
4 students would be each be holding 3 pieces of paper: 1 with a number on the "door" and another with code on it. The code would be hidden behind the "door numbered" piece of paper. The code would list the animal type. The last piece of paper would be a method.
What else do you need (e.g., old tennis ball, Powerpoint slides, software).
There may be a Powerpoint slide still up on the screen with the rules listed as a reminder.
The script
Describe how to do your exercise.