imperative / Java
Representation
Collected by Colleen Lewis — Own practice
Shows the need for references and shows int arrays as sequences of ints.
PL | NM |
---|---|
int | number written on paper in a small blue pocket |
int array | sequence of int variables |
variable | variable name followed by a small box |
stack frame | rectangle with the method name written on the side containing all local variables |
reference | pocket containing a remote control with a ribbon to the referent |
null | empty pocket with an X shown in the back |
Two references can refer to the same array. And arrays are just sequences of variables.
Introducing Java ints, int arrays, references to arrays, and null.
Creating the physical model is a lot of work.
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".