CSC 216/s08/trees and grass: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(→‎The script: Extending the content some)
 
(4 intermediate revisions by the same user not shown)
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]
-->
-->
==Memory==
=Memory=
A novel twist on a classic children's game.
A novel twist on a classic children's game.


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


This exercise will help illustrate the different relationships that classes can have with each other.
This exercise will help illustrate the different relationships that classes can have with each other.
Line 18: Line 18:
* Association
* Association


===Participants and props===
==Participants and props==


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


This exercise is designed to involve the entire class. It will require several index cards, some tape.
This exercise is designed to involve the entire class. It will require several index cards, some tape. The cards should be labeled before class begins, and the students should not know their contents. Some example cards are given below, but the exercise is not restricted to these examples.


====The Cards====
===The Cards===
 
An example of some cards that could be used in this exercise are listed below. They are divided into the different relationships demonstrated between the cards.


'''Association'''
'''Association'''
Line 44: Line 46:
* Linked List - Iterator
* Linked List - Iterator


===The script===
==The script==


<!--Describe how to do your exercise.-->
<!--Describe how to do your exercise.-->


'''Setup:'''
'''Setup:'''
The cards are scrambled, and then taped on the board in a grid. If the class is large, you may consider having the students break into teams of two or three.
The cards are scrambled, and then taped on the board in a grid. If the class is large, you may consider having the students break into teams of two or three. In addition, the different relationships that any two cards may have should be listed next to the cards.


'''Gameplay:'''
'''Gameplay:'''
Each student, in turn, is given the chance to select two cards to be flipped over. If the student believes that the two cards are a match, then they must identify the manner in which the two cards are related. If the student is correct, these cards are removed from the board and handed to that student. This is repeated until the grid is entirely removed. The person with the most cards wins.
Each student, in turn, is given the chance to select two cards to be flipped over. If the student believes that the two cards are a match, then they must identify the manner in which the two cards are related. If the student is correct, these cards are removed from the board and handed to that student. If the student is incorrect, their turn is over and the next student is given the same opportunity. This is repeated until the grid is entirely removed.
The game ends when there are no more unmatched cards. The student/group with the most cards is the winner.

Latest revision as of 20:29, 10 April 2008

Memory

A novel twist on a classic children's game.

The problem

This exercise will help illustrate the different relationships that classes can have with each other.

The game is played much like the classic game Memory, that requires the participants to remember the location of two related cards. Unlike a traditional memory game, the cards will not be identical, but will rather be two related classes. These classes can be related in several ways:

  • Inheritance
  • Interfacing
  • Inner Class
  • Aggregation
  • Association

Participants and props

This exercise is designed to involve the entire class. It will require several index cards, some tape. The cards should be labeled before class begins, and the students should not know their contents. Some example cards are given below, but the exercise is not restricted to these examples.

The Cards

An example of some cards that could be used in this exercise are listed below. They are divided into the different relationships demonstrated between the cards.

Association

  • Car - Driver
  • Course - Instructor

Aggregation

  • Cell - Grid

Inheritance

  • Plant - Flower
  • Animal - Bee

Interfacing

  • Comparable - Double
  • Flushable - Toilet

Inner Class

  • Linked List - Iterator

The script

Setup: The cards are scrambled, and then taped on the board in a grid. If the class is large, you may consider having the students break into teams of two or three. In addition, the different relationships that any two cards may have should be listed next to the cards.

Gameplay: Each student, in turn, is given the chance to select two cards to be flipped over. If the student believes that the two cards are a match, then they must identify the manner in which the two cards are related. If the student is correct, these cards are removed from the board and handed to that student. If the student is incorrect, their turn is over and the next student is given the same opportunity. This is repeated until the grid is entirely removed. The game ends when there are no more unmatched cards. The student/group with the most cards is the winner.