Alice Community  

Go Back   Alice Community > Alice 3 > How Do I?

Reply
 
Thread Tools Display Modes
Nifty way of using Alice for visualizing array algorithms
Old
cayhorstmann
Guest
 
Status:
Posts: n/a
Default Nifty way of using Alice for visualizing array algorithms - 10-18-2009, 12:35 AM

I use Alice 3.0 for lab assignments in my CS1 class, and students love it. Carol the robot is a big hit when she escapes a maze (hear the applause at http://helsinki.cs.sjsu.edu:8080/vid...46a-2009-09-29 around 44:15) or drops beepers in a spiral pattern. Why Carol? I am trying out Leland Beck's cooperative learning labs, which use Karel, but since I am already using Alice, I don't want students to learn another environment. So I made an Alice class that acts like Karel. The 3D looks sooo much better--I know it is silly and only visual fluff, but it really makes a difference for the students.

Now I came up with this nifty way of doing array algorithm visualizations. I simply subclass ArrayList<E> to VisualArrayList<E extends Model>, and override add/remove to visually shift the elements. So, you can really feel in your gut that remove(0) is pretty slow because you have to wait for the darned cars to move s l o w l y to the left. See http://horstmann.com/sjsu/cs46a/lab8/index.html and go to part D.

My point is that it is really easy for a moderately skilled coder to twist Alice 3 into animating things that I would have never considered doing in the drag-and-drop world of Alice 2. Alice 2 is a great tool, but Alice 3 is a great toolkit!
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.