Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Use realistic examples of class variables to increase understanding.

  • For example, consider a student class that allocates unique ID numbers sequentially to students.
    • The class would need a variable to store the next available unique ID number.

More about this tip

Tags

  • CS 1
  • Intro Programming
  • Meaningful and Relevant Content
External Source

Interview with Charlie McDowell

Other Tips By
Other Tips By Charlie McDowell

Similar tips

Show a variety of for loops conditionals (e.g., < vs. <=; different variable names, different start values, different increment operations) to avoid common misconceptions about loops.
Spend extra time teaching Big O in intro classes that use Python because the underlying implementation of Python lists is a mystery to students that leads students to believe many operations are constant, O(1), that are not.
Compare adding padding to elements in CSS to adding fillings to a sandwich; it actually increases the total width.

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Powered by Drupal.

Privacy Policy