imperative / Java
Representation
Collected by Colleen Lewis — Own practice
Distinguish between the type of the reference and the type of the object.
PL | NM |
---|---|
... | (all aspects of Physical Java 2) |
variable type | sticky note with the name of the type next to the pocket that holds the reference |
parent reference | a remote control that only has buttons corresponding to the things that the parent object knows how to do. |
child object | a stuffed animal that - as a child - 'does what it wants' and not necessarily what the parent would do. |
Reference type constrains what methods can be called and object type determines what method is called.
Introducing inheritance.
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".