Quantcast
Viewing latest article 4
Browse Latest Browse All 5

Answer by ctrl-alt-delor for How should I respond to a student who proposes a "weak" analogy?

An array is like a list of event handlers. But it is not like an event handler. Telling students stuff does not work well, but having them discover it does.

The student has seen something in the description that is like an array, this is good they are making connections. Unfortunately (at you say) they may make the wrong connection. You are discussing a list/array of event handlers, the student thinks you are talking about event handlers.

Therefore as @Buffy said, ask them to elaborate. Ask how it is like an array, and how it is not.

You could also do an active learning activity: have a student be an event handler, another to be an event, a sheet of paper to be a button. Act this through. Then add another event-handler/student, then another. Where do they go? What is the data structure that the event-handlers are in. What do we have to do to trigger all of the events-handlers. [There is something else doing a foreach event_handler in event_handlers]


Viewing latest article 4
Browse Latest Browse All 5

Trending Articles