programmingHS 2010
Shodor > SUCCEED > Workshops > Archive > programmingHS 2010

Today, Gavin started the class off by rearranging some of the already-created elements: namely, the students created a new panel and put both the sliders and the legend into that panel, side-by-side. The applet was now finished in terms of layout, with two graphs, four slider bars, a graph legend, and several drop-downs and buttons.

Trent then took up the torch, using the rest of the day to implement a lot of the components that the students added yesterday. First, he explained how to change the labels above the sliders and how to change the variables behind them. Next, Trent showed the students how to start, pause, and reset the 'timer' button. The 'timer' was the force causing the model to change over time.

Finally, Trent showed the students how to implement the methods for actually moving 'people' around the grid and causing them to get sick, based on a random number and the variables set by the sliders. By the end of the day, all of the students had a good understanding of how the 'behind-the-scenes' part of the model worked: that is, how the sliders and buttons worked, and how those affected the simulation itself.