the program should send the word "examine" to the note object in the room. Specifically, it should pass the String "examine" to the note's handle() method. If the user types
eat note
the program should send the word "eat" to the note's handle() method.
Consider some questions:
What if we just type "jump" or "whistle"? What object is handling those words?
What if we just type "note"? How should the program respond? Should it pass an empty string to the note's handle() method, or should it go back to the user?
What if we put the note in the user's inventory, then the user types "examine note." What happens next?
Suppose we say the program is searching through lists to find its target. What lists?
If the user types
examine note
the program should send the word "examine" to the note object in the room. Specifically, it should pass the String "examine" to the note's
handle()
method. If the user typeseat note
the program should send the word "eat" to the note's
handle()
method.Consider some questions:
handle()
method, or should it go back to the user?