Misconception: students struggle with the onMousePress method (and other mouse interaction methods) in the Java objectdraw Library from Williams College; they need help understanding it’s called even when don’t explicitly call it.

  • The objectdraw library for Java from Williams College is built to help produce intuitive learning in Java using graphics.
  • This method gets called when students click so it will run without them ever having to explicitly call it.
    • As a result, students don’t realize that the method is being called. Understanding how methods get called without being explicitly called is an important step in learning the stuff that "happens behind the scenes."
  • Demoing Scratch can be a great way to illustrate this idea to students.
    • Event blocks in Scratch that get called in response to different situations, like a mouse click, show what is happening.
    • These blocks will light up in the scripts panel in the Scratch IDE when these events happen.
      • This helps students understand that methods and functions can be called through an event like a mouse click without explicitly being called in their program.

More about this tip

External Source

Interview with Dani McAvoy