View Single Post
Chapter 5, Exercise 5
Posts: n/a
Post Chapter 5, Exercise 5 - 04-06-2010, 04:10 PM

This is on page 237 of the textbook.

I'm having trouble making the object parameter actually go to something. I want it to be set by a user input.

The magician asks what object needs to disappear. User specifies which of the 3 to disappear. However, when I use the object parameter, it does not give me an option to set that parameter as what the user input was. I also have to make sure that I follow this:

"not reference any objects directly in the makeDisappear method. Instead, use the object parameter to determine which object will disappear. When you create the call to the makeDisappear method from world.animation, you will be prompted to specify the object that will be used by makeDisappear. Also note, that since there are 3 objects, you will need to call makeDisappear 3 times in world.animation)".

I'm obviously missing something, and I feel the chapter didn't cover object parameters that much. I don't see a way to make the object parameter interact with a string from a user input, so having both really results in nothing. : (
Reply With Quote