Object as Student

Programming Language

object-oriented / any

Form

Analogy

Attribution — Origin / Source

Collected by Matthias Hauswirth — Own practice, Andrianoff & Levine

Conceptual Advantage

Makes explicit that an object is an identifiable thing that answers to calls.

Mapping

PLNM
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

Draws Attention To

Objects, method calls, and returns.

Use When

When the meaning of OO is still unclear.

Cost

Difficult for instructor to react to students' actions during role-play,and to catch (and exploit) all the teachable moments.

Details

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:

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