Presentation is loading. Please wait.

Presentation is loading. Please wait.

Traffic Light: A Pedagogical Exploration Through a Design Space Viera K. Jeff Richard Rasala

Similar presentations


Presentation on theme: "Traffic Light: A Pedagogical Exploration Through a Design Space Viera K. Jeff Richard Rasala"— Presentation transcript:

1 Traffic Light: A Pedagogical Exploration Through a Design Space Viera K. Proulxvkp@ccs.neu.edu Jeff Raabjmr@ccs.neu.edu Richard Rasala rasala@ccs.neu.edu Northeastern University, Boston MA 02115 http://www.ccs.neu.edu/teaching/EdGroup/ NSF LLD award DUE-9659552 + Microsoft support

2 Outline Our Mantra: Examples that Matter Model- View-Controller Model: State and Transitions Display and Control Adding Variations Pedagogical Considerations Conclusion

3 Our Mantra: Examples that Matter OO is a new paradigm Need objects with rich behavior Need problems with interacting objects Need to escape from sequential model Accessible examples Graphics - motivation, feedback Design exploration

4 Model - View - Controller Design pattern used with displays Model: internal data we need to keep Model: actions on internal data View: display of information for user View: used both for input and output Controller: responds to user actions Controller: initiates model actions

5 Model: State and Transitions Traffic light: to the outside observer –exhibits the current display –changes to a new display based on a timer –cycles through a set of possible displays Internal model –state of the lights at the whole intersection –length of time for each state to last –sequence of states that we cycle through

6 Display and Control Display and Control Elements: –display: four light faces (NESW) –control: Start, Stop, Step - cycle –display: state settings for one timer interval plus length of time –display: whole control sequence –control: place in control sequence –control: append, change, delete, clear

7 Adding Variations Left turn lights Flashing lights Four-way walk lights Unidirectional walk lights Walk request button Emergency sequence Multiple time-of-day sequences Sensor-driven light changes

8 Pedagogical Considerations Students are familiar with real life problem Basic model ideal for object oriented solution Model-View-Controller model is right Number of options for implementation of the data model representation Number of choices for controls and displays

9 Pedagogical Considerations Simplest project: Design a basic light –design and implement state transition diagrams –design the data model –design the display –design the controls –implement your design Expand: discuss design of options Implement some of them

10 Conclusion Our experiences: –interesting project - students get involved –some do not understand what to include in the light class - good opportunity to learn –good students can push the boundary Conclusion –more examples like this are needed –they change the way we ALL think about programming

11


Download ppt "Traffic Light: A Pedagogical Exploration Through a Design Space Viera K. Jeff Richard Rasala"

Similar presentations


Ads by Google