alice-teacher Alice Textbook Flaw (Using Lists for "The Wave")

Michael L Owen mrgrog at outlook.com
Wed Apr 22 17:09:36 EDT 2015


That Chapter covers quit a bit of material including lists and poses. The Tips and Techniques should give you several useful options to accomplish this task.
 
1) Create a parallel set of poses for each character that perform the wave.  Each  unique pose for a character in a set should have the same name as the parallel poses for the other characters.
 
2) Create a list of character objects.
      A "for all in order" loop should be a piece if cake using set poses for the list items.
 
Another alternative would be to create a complete "wave" method for each character.  The catch here is that there is no direct way to create  method call for a list item. You can, however, use "if" statements that compare the current list item with each object, and call the appropriate object method it there is a match.
 
Programming Fun, 
 
Mike Owen 
 

> We're using the Dann, Cooper, Pausch "Learning to Program with Alice" 3rd Edition, Prentice Hall, 2012 textbook in our Computer Programming class.
> 
> Chapter 9, page 280, Exercise 9-1 has an interesting real-world problem:  In Alice practice processing a List (in order) where each of four persons executes "the wave" (a popular cheer in football or basketball games).
> 
> The problem suggests using four people:  coach, student1, skaterGirl, and randomGuy2.  However two of these objects articulate their arms differently than the others.  It is very difficult for students to re-position the arms of coach and student1.  I tried myself for more than an hour, finally giving up.

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20150422/8b64b6ed/attachment.html 


More information about the alice-teachers mailing list