Introduce object states early when teaching object-oriented programming.

  • Students have trouble understanding and describing the state of an object, i.e., the values of its attributes/private data members.
  • They also have trouble describing the state of an object or variable within methods, which may impede them from writing successful methods.
  • Students sometimes believe that two objects of the same class with the same attribute values are the same object.
  • Students may also have the misconception that two objects of the same class can’t have the same attribute values.

More about this tip

External Source

"Visual program simulation in introductory programming education" by Juha Sorva, from Appendix A: Misconception Catalogue

Other Tips By