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

Have students implement a web-based driving game in JavaScript to pick up classmates, who appear as 2D avatars, within Google Earth and drop them off at their homes to show students that arrays and objects are applicable to real-world problems.
Ask students "do you know in advance how many times you'll need to go through the loop?" when deciding between using a for or a while loop, because this is a good rule of thumb for them to use.
Misconception: Return is a mystery to students because they may not understand that functions have an entry point and an exit point. This results in mistakes such as assuming Python will return the right thing.

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

Privacy Policy