Object-Oriented Software Design Chapter 4 Questions For Alice Has Hundreds Prewritten Classes For Instantiating Objects Alice

subject Type Homework Help
subject Pages 5
subject Words 719
subject Authors Randy Pausch, Wanda P. Dann

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
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.
page-pf2
11) If you wish to write a class-level method where anther object is involved, what can be
done to allow your code to call the other object’s methods?
12) What is the difference between opacity and isShowing properties of an object, in terms of
visibility of an object in Alice?
13) Sketch a storyboard and an implementation strategy diagram for exercise 2.
My first method:
Do the following steps in order
hopLeft:
Do the following steps in order
Kangaroo turn left 1/6
Added detail is needed for preparing to hop, hopping up, and landing. See the solution
(in html) for exercise 2 for one possible solution
page-pf3
14) Sketch a storyboard and an implementation strategy diagram for exercise 5.
my first method:
duet:
Do the following together
solo:
Do the following together
World play music
page-pf4
15) Sketch a storyboard and an implementation strategy diagram for exercise 11.
Loop 2 times
Do the following steps in order
Each of these walk and funky chicken dance methods can be reasonably defined. See
the html solution for exercise 11 for one possible solution
page-pf5

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.