CSC 216 F09/ Visual Exception Handling Exercise: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Listen to this isntended to give beginning and intermediate java classes an opportunity to understand the concept behind action events in relation to GUI programming. This game is intended to be info)
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Listen to this!
===Formatting Resources===
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]


By, Steven Elliott, Eric Lumpkin, Ryan Orning
==Visual Exception Handling Exercise==


Purpose: This game is intended to give beginning and intermediate java classes an opportunity to understand the concept behind action events in relation to GUI programming.  This game is intended to be informative, interactive, and at the same time entertaining.
Authors: Jason Cockrell, John Phillips


Supplies:
This exercise will demonstrate how exceptions are caught in try exception clauses.   
• 6 willing participants
• 3 pieces of paper with if/else statements that correspond to the button namesThe inside should have some fun but not demeaning task.  Use Pseudo-code.
o if (e.getSource() == btnJump) { run(do 5 jumping jacks)}
• 3 pieces of paper with the button names on them.  Try to make them ambiguous so that the action performed does not know what the action will be.


Set up:  Have 3 of the volunteers be the buttons.  Give each button a piece of paper with the button name on it.  The buttons should NOT look at the paper.  Then have your other 3 volunteers be the actionPerformed method.  They should stand in order. With the else’s being after the first if statement.  They CANNOT look at their action.  This will be more entertaining for the class and also shows that the actionPerformed method is unaware of the task until it is activated.
===The problem===


Playing the Game:  Have the class “push” (pick) a button.  The button then takes the paper with the name on it and hands it to the first if statement.  The if/else’s should run as a normal program would and pass the paper to the next one until the action is carried out.  Once the paper gets to the correct if statement, the action within the statement should be carried out.  Then repeat until all the buttons/actions have been preformed.  
Describe what you are attempting to teach students by this exercise.


Example actions:
===Participants and props===
• Jumping jacks
 
• Saying a phrase System.out.speak(“Java is my favorite language”);
How many students will participate?  What else do you need (e.g., old tennis ball, Powerpoint slides, software).
• Writing a phrase on the whiteboard.
 
• Etc.
===The script===
 
Describe how to do your exercise.

Latest revision as of 23:16, 12 November 2009

Formatting Resources

Formatting Help Guide from MetaWiki

Visual Exception Handling Exercise

Authors: Jason Cockrell, John Phillips

This exercise will demonstrate how exceptions are caught in try exception clauses.

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.