Show students what code looks like with and without new programming constructs (e.g., methods, Objects, inheritance, loops, switch statements) to motivate the reasons for using new concepts.

  • Comparing code with and without new programming constructs can help:
    • students understand new constructs by mapping them back to the existing constructs.
    • motivate new programming construct by helping students see how it makes the code easier to understand.
  • Note from the CSTeachingTips Team: Check out these specific tips on how to introduce new concepts by comparing code with and without it.

More about this tip

External Source

Interview with Samar Swaid.