object-oriented / any
Analogy
Collected by Matthias Hauswirth — Own practice, Andrianoff & Levine
Makes explicit that an object is an identifiable thing that answers to calls.
PL | NM |
---|---|
class | natural language description of methods and their behaviors (on sheet of paper) |
object | student |
method call | verbal request made to student |
actual argument | stated as part of verbal request |
return value | verbal response from student |
Objects, method calls, and returns.
When the meaning of OO is still unclear.
Difficult for instructor to react to students' actions during role-play,and to catch (and exploit) all the teachable moments.
This idea is based on Andrianoff & Levine’s Role Playing in an OO World.
Matthias Hauswirth uses this notional machine in the first week of his object-oriented programming course. The course follows an objects-first methodology, and object creation and method invocation are the first concepts students learn.
This analogy-based notional machine has two main risks:
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".