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 write a program that constructs an n x n Magic Square in Java so they gain practice working with bounds in 2D arrays.
Misconception: Students think that when they create a new variable within a function, that function will automatically return that variable’s value when executed.
To show that algorithm design is difficult, have students write algorithms, exchange their work, and then attempt to execute each others instructions.

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

Privacy Policy