Printing and displaying a Question
The following methods allow for a Question to be represented as text from the point of view of an end-user and developer respectively. You can use the category suggestion feature of the browser to place these methods into their correct categories.
Important: Place the browser back into Instance mode before adding these methods.
"Answer the name of the receiver as a user should see it. For this
we append a question mark."
aStream nextPutAll: self text; nextPutAll: ' ?'.
"Answer the name of the receiver as a developer would wish
to see it."
super printOn: aStream.
aStream nextPut: $(.
self displayOn: aStream.
aStream nextPut: $).