imperative & OO / Java, C#, ...
Representation
Collected by Johan Jeuring — Interview, Jeroen Fokker
Students need to understand that program variables (or collections of variables in an object) refer to memory locations, which might contain different kinds of values, and that statements (methods) change memory locations for variables (objects).
PL | NM |
---|---|
variable | typed box/memory location |
statement | changes a memory location |
object | collection of boxes in memory |
method | changes an object |
Different kinds of variables (objects) take up different space in memory. Statements and methods change the memory, which is visualized by changing the contents of the boxes when executing a statement or method.
When introducing language constructs in a beginners' programming course
Investment - time/cognitivie
Based on a textbook by Lindsey & van der Meulen.
Do you have feedback on this notional machine? Did you find a mistake, or do you have a request for improvement? You can create an Issue on GitHub, where the description is hosted. This way we can see your feedback and address it.
For this, you need a GitHub account. Then follow this link to see the source file of this page. In there, click the ... left of the highlighted line, then pick "Reference in a new issue".