Have students instantiate personal hall pass objects when they wish to leave the classroom to help them learn that the values passed to a constructor have to match the number, type, and order of the arguments in the method signature.

  • The Hall Pass Class is helpful because repeated practice helps students build better understanding of concepts.
    • Creating HallPass objects every time they leave class is a good opportunity for practice.
  • Activity:
    • Post the code for a HallPass class in large print on a poster somewhere easy to see in your classroom.
    • When students wish to leave the classroom, they have to instantiate a hall pass.
      • Students create a HallPass by writing the lines of code necessary to instantiate a hall pass on a piece of paper.
    • Students get to use the hall pass if the line code is correct:
      • The number, type, and order of values passed to the constructor match what is required and accurate in that setting.
      • For example, a pass might read:
        • HallPass pass = new HallPass ("Mary Smith", "9/15/15", "2:20pm", "restroom");

More about this tip

External Source

Interview with Ria Galanos