Questions for Chapter 4
1) Alice has hundreds of pre-written classes for instantiating objects in an Alice world.
Where, in the Alice interface, can you find these pre-written classes?
2) Is it possible for your Alice program to have more than one instance of the same class?
Explain your answer.
3) When you click on the Play button in Alice what method is automatically called? Why?
By default, World.my first method is called. In Chapter 5, we’ll learn about creating
4) What is another term commonly used for “calling a method”?
5) In Alice, one method may call another method, which may require one or more values to
be communicated with the method being called. a) What part of an instruction holds a
value to be communicated? b) What part of the called method receives the value?
6) List the types of parameters that may be in an Alice method.
Number, Boolean, and Object are the most common. Other less common types include
7) Why is it useful to test a method by sending in different arguments?
8) What is the distinction between a world-level method and a class-level method?
9) Alice is said to have a very primitive form of inheritance because inheritance is not “fully
defined” as part of the Alice system. What kinds of methods (world-level or class-level)
can be used as part of its primitive inheritance capability?
10) If sound is being imported in a class-level method, should the sound be imported for the
object or for the world? Explain your answer.