Typed Boxes Memory

Programming Language

imperative & OO / Java, C#, ...

Form

Representation

Attribution — Origin / Source

Collected by Johan Jeuring — Interview, Jeroen Fokker

Conceptual Advantage

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).

Mapping

PLNM
variable typed box/memory location
statement changes a memory location
object collection of boxes in memory
method changes an object

Draws Attention To

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.

Use When

When introducing language constructs in a beginners' programming course

Cost

Investment - time/cognitivie

Details

Based on a textbook by Lindsey & van der Meulen.

Comments or Feedback?

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".

Create an Issue on GitHub