Table of Contents

Week 5: Teaching Programming: Programming: Execution Flow, Variables, Memory

Objectives

Discussion

  1. What do you think new students find difficult to understand when first learning about variables?
  2. Have you thought about variables having “roles” as described in Kuittinen (2004)? Do you think this concept would help students understand variables more easily? (Do you know about “painted types” and “Hungarian notation”?)
  3. In what ways do students confuse (“conflate”) objects and classes? Objects and variables?
  4. How could you explain the C++ string method “swap”?

Topics

It is important that students understand the difference between numeric and string variables and the way they are handled in the language. An activity early in the course to help students learn the differences can prevent grief later in the course for them. An assignment where students correct variable mismatches or write a program with mismatches for a classmate to correct would be valuable.

Readings for Class Discussion

Lab