True/False Indicate whether the
statement is true or false.
|
|
|
1.
|
A method name should usually be a noun or noun phrase.
|
|
|
2.
|
Long methods are complicated, and therefore more error prone.
|
|
|
3.
|
The object tree’s ground object represents the program as a whole.
|
|
|
4.
|
Class Dragon provides a flapWings() method.
|
|
|
5.
|
Methods that control the behavior of a single object should be stored in that
object.
|
|
|
6.
|
Part of the “art” of Alice programming is testing with different
values until an animation is visually satisfying.
|
|
|
7.
|
The Alice clipboard enables you to move statements already in your scene method
into a new (empty) shot method.
|
|
|
8.
|
The Alice clipboard holds multiple statements.
|
|
|
9.
|
Alice enables you to increase the number of clipboards displayed.
|
|
|
10.
|
Alice does not allow objects to be reused in different worlds.
|
|
|
11.
|
The most efficient way to change camera positions between shots is to use a set
of simultaneous move() and turn()
methods.
|
|
|
12.
|
When a dummy object is first added to the world, it assumes the same point of
view as the camera.
|
|
|
13.
|
All dummy objects are stored in the object tree.
|
|
|
14.
|
By default, the duration of the setPointOfView() method is 2 seconds.
|
|
|
15.
|
An object’s shape determines its location within the 3D world.
|
|
|
16.
|
Once you create a world and start adding objects to it, every object is located
somewhere within that 3D world.
|
|
|
17.
|
Every Alice object has its own three axes.
|
|
|
18.
|
Alice’s move() message allows an object to only
move along that object’s FORWARD-BACKWARD axis.
|
|
|
19.
|
An object’s orientation is its combined yaw, pitch, and roll.
|
|
|
20.
|
An object’s orientation determines where in the world that object is
located.
|
|
|
21.
|
Alice objects have only three degrees of freedom.
|
|
|
22.
|
Method variables are names defined within a method that refer to locations in
program memory.
|
|
|
23.
|
A variable’s name describes the kind of value you intend to store in
it.
|
|
|
24.
|
The initial value is the value a variable contains when a method begins.
|
|
|
25.
|
Alice provides a function that will build and display dialog objects.
|
|
|
26.
|
The square root function is available in the World’s methods pane.
|
|
|
27.
|
A value that you pass to an object via a message is called an argument.
|
|
|
28.
|
The pointAt() and say() methods each have two parameters.
|
|
|
29.
|
When you specify a new parameter, you provide Alice with a name and a
type.
|
|
|
30.
|
An object variable is defined within a method.
|
|
|
31.
|
Each Alice object has a number of predefined object variables.
|
|
|
32.
|
If the movements of two objects are synchronized, when one of the objects moves,
the other moves with it.
|
|
|
33.
|
An object’s default vehicle is the ground.
|
|
|
34.
|
You may define a function in Alice.
|
|
|
35.
|
An Alice method produces a value.
|
|
|
36.
|
When Alice defines an empty function, it does not include a return statement.
|
|
|
37.
|
The ability to define both methods and functions is central to object-based
programming.
|
|
|
38.
|
A doInOrder statement produces a sequential
execution.
|
|
|
39.
|
Alice does not provide statements that produce parallel execution.
|
|
|
40.
|
The doInOrder and doTogether
structures are flow control statements.
|
|
|
41.
|
The Boolean type is a user-defined type.
|
|
|
42.
|
When a function returns a value of true or false, it acts as a condition.
|
|
|
43.
|
The equality (==) and inequality (!=) operators may only be used to compare Number
values.
|
|
|
44.
|
Boolean operators are used to combine or modify relational operations.
|
|
|
45.
|
Any time you use the word if to describe a desired behavior, you can use
Alice’s if statement to produce that behavior.
|
|
|
46.
|
When the if statement’s condition is true, the first group of statements is skipped and the second group is
executed.
|
|
|
47.
|
The term selective flow refers to the type of behavior produced by an if statement.
|
|
|
48.
|
You can use an if statement to guard a group of
statements.
|
|
|
49.
|
The if statement provides a way to build
if-then-else logic into a method.
|
|
|
50.
|
A for statement is sometimes called a general
loop.
|
|
|
51.
|
The complicated version of the for loop can only count up.
|
|
|
52.
|
The asSeenBy attribute of the turn() message is normally set to None.
|
|
|
53.
|
You should use the for statement to generate
repetitive flow behavior when you do not know in advance the number of repetitions required.
|
|
|
54.
|
A while statement without a falsifiable
condition will create an infinite loop.
|
|
|
55.
|
The while statement is an indefinite loop.
|
|
|
56.
|
The for statement is a more general flow-control
structure than the while statement.
|
|
|
57.
|
Both the while and the for
statements test their condition after the statements within the loop are performed.
|
|
|
58.
|
A Boolean variable can only store one value at a
time.
|
|
|
59.
|
An array can be used to store a sequence of values.
|
|
|
60.
|
The doInorder statement is an appropriate tool for
iterating through the entries in a list.
|
|
|
61.
|
The forAllTogether statement loops through the
items in a list sequentially.
|
|
|
62.
|
The list methods menu allows you to send a message to any of the items in the
list.
|
|
|
63.
|
There are situations in which a program needs to modify the contents of a list
as it is running.
|
|
|
64.
|
The index of the first item in a list is always one.
|
|
|
65.
|
To remove the first item from a list, you can use the remove(0) method.
|
|
|
66.
|
You cannot change the values of the items in an array once your program begins
running.
|
|
|
67.
|
If you have a group of items to store and the size of the group never changes,
it is more memory-efficient to store the group in a list instead of an array.
|
|
|
68.
|
In most other programming languages, items in a list cannot be accessed via
index values.
|
|
|
69.
|
To access an arbitrary group item, a list is more time-efficient than an
array.
|
|
|
70.
|
Alice provides a wide variety of predefined operations for array
variables.
|
|
|
71.
|
Currently, the Alice forAllInOrder and forAllTogether statements can only be used on a list, not on an array.
|
|
|
72.
|
The forAllInOrder statement goes through the items in
a list from last to first.
|
|
|
73.
|
All Alice Objects have upperBody components.
|
|
|
74.
|
Alice will not let you access the upperBody component
of an item from a list.
|
|
|
75.
|
Components of an Alice object can be referred to by Object variables.
|
Multiple Choice Identify the
choice that best completes the statement or answers the question.
|
|
|
76.
|
Alice lets us build programs consisting of statements, in which we often send
messages to ____.
a. | classes | c. | functions | b. | objects | d. | methods |
|
|
|
77.
|
Alice’s ____ messages provide an excellent set of basic operations for
animation.
a. | supplementary | c. | encrypted | b. | instant | d. | predefined |
|
|
|
78.
|
The Horse class includes a predefined method called ____.
a. | walk() | c. | say() | b. | trot() | d. | gallop() |
|
|
|
79.
|
In Alice, methods stored in the world are called ____
methods.
a. | global | c. | general | b. | universal | d. | world |
|
|
|
80.
|
A(n) ____ method is used to define a complex behavior for a single
object.
a. | object | c. | external | b. | local | d. | inlined |
|
|
|
81.
|
To help human readers understand why a method’s statements are there, good
programmers insert explanatory ____ into their methods.
a. | behaviors | c. | comments | b. | actions | d. | conditions |
|
|
|
82.
|
The comment control is located at the bottom of the ____.
a. | object tree | c. | world window | b. | editing area | d. | details area |
|
|
|
83.
|
To edit a comment’s explanation, you can either double-click its text, or
click its list arrow and choose ____ from the menu that appears.
a. | default string | c. | No
comment | b. | Comment | d. | other |
|
|
|
84.
|
If you right-click on a statement, Alice displays a menu containing a
____ choice.
a. | make copy | c. | clipboard | b. | duplicate | d. | cut and paste |
|
|
|
85.
|
When you click the Save button to store an object,
Alice saves the object in a special alice-2.0-____ file.
a. | object | c. | image | b. | class | d. | binary |
|
|
|
86.
|
Alice places a ____ object in every world.
a. | timeline | c. | scene | b. | stage | d. | camera |
|
|
|
87.
|
A ____ is an invisible marker in your world that has a position and an
orientation.
a. | dummy | c. | flag | b. | pointer | d. | sentinel |
|
|
|
88.
|
The ____ method changes the position and orientation of obj to that of
obj2.
a. | obj.turnToFace(obj2) | b. | obj.setPointOfView(obj2) | c. | obj.pointAt(obj2)
| d. | obj.constrainToPointAt(obj2) |
|
|
|
89.
|
To render an object invisible, set its ____ to 0 in the properties pane.
a. | fillingStyle | c. | opacity | b. | skin
texture | d. | vehicle |
|
|
|
90.
|
Every object in a 3D world has ____ attributes that determine its position and
orientation in the world.
|
|
|
91.
|
An object’s ____ determines the way it is facing in the 3D
world.
a. | displacement | c. | shape | b. | orientation | d. | dimensionality |
|
|
|
92.
|
To change an object’s position, Alice provides a method named ____.
a. | say() | c. | move() | b. | think() | d. | playSound() |
|
|
|
93.
|
In 3D terminology, an object’s ____ is how much it has rotated
about its UP-DOWN axis from its original position.
a. | yaw | c. | reorientation | b. | spin | d. | skew |
|
|
|
94.
|
An object’s orientation has ____ parts.
|
|
|
95.
|
In Alice, an object’s combined position and orientation are called that
object’s ____.
a. | point of view | c. | attitude | b. | location | d. | perspective |
|
|
|
96.
|
A(n) ____ is a name that refers to a piece of the program’s memory, in
which a value can be stored, retrieved, and changed.
a. | dummy | c. | variable | b. | class | d. | object |
|
|
|
97.
|
A method variable lets you store a value within a(n) ____ for later use.
a. | parameter | c. | argument | b. | method | d. | property |
|
|
|
98.
|
A(n) ____ variable lets you store the property of an object.
a. | global | c. | bound | b. | free | d. | object |
|
|
|
99.
|
When you ____ a variable, you provide Alice with a name, type, and initial
value.
a. | extend | c. | define | b. | hide | d. | destroy |
|
|
|
100.
|
Alice provides ____ basic variable types.
|
|
|
101.
|
In Alice, a(n) ____ variable type is used to store numeric information.
a. | Integer | c. | Double | b. | Number | d. | Long |
|
|
|
102.
|
The ++ sign is called the ____ operator.
a. | union | c. | join | b. | addition | d. | increment |
|
|
|
103.
|
A(n) ____ is a temporary argument passed to a function.
a. | dummy | c. | stub | b. | placeholder | d. | sentinel |
|
|
|
104.
|
The____ function returns the distance from the center of one object to the
center of the other object.
a. | distanceInFrontOf() | c. | distanceTo() | b. | distanceAbove() | d. | distanceBelow() |
|
|
|
105.
|
The type of the value you send with the say() message
must be a(n) ____.
a. | Boolean | c. | Object | b. | Number | d. | String |
|
|
|
106.
|
In programming, combining two strings a and
b into a single string ab is
called ____ the strings.
a. | adding | c. | merging | b. | concatenating | d. | joining |
|
|
|
107.
|
The ____ sign is called the concatenation operator.
|
|
|
108.
|
Object variables are also known as ____ variables.
a. | external | c. | static | b. | instance | d. | global |
|
|
|
109.
|
An object’s ____ is the thing on which it
“rides.”
a. | vehicle | c. | container | b. | platform | d. | module |
|
|
|
110.
|
The value the function produces is whatever value appears in the
function’s ____.
a. | parameter list | c. | name | b. | return
statement | d. | storage
class |
|
|
|
111.
|
A function-message must be sent from a place where a(n) ____ can
appear.
a. | property | c. | value | b. | control | d. | object |
|
|
|
112.
|
A method-message can only be sent from a place where a(n) ____ can
appear.
a. | comment | c. | attribute | b. | variable | d. | statement |
|
|
|
113.
|
From the perspective of an Alice program, you can think of a flow as the
sequence of statements that are performed when you click the ____ button.
a. | create new parameter | c. | Play | b. | create new
variable | d. | ADD
OBJECTS |
|
|
|
114.
|
Computer scientists often describe flow control statements as control
____.
a. | consoles | c. | panels | b. | parameters | d. | structures |
|
|
|
115.
|
The ____ statement directs program flow through a group of statements an
arbitrary number of times.
|
|
|
116.
|
A(n) ____ variable can have either of just two values: true
or false.
a. | Number | c. | Object | b. | String | d. | Boolean |
|
|
|
117.
|
The ____ pane of Alice’s details area contains questions we can ask an
object.
a. | methods | c. | functions | b. | properties | d. | messages |
|
|
|
118.
|
A(n) ____ variable can serve as a condition in an if or while statement.
a. | String | c. | Object | b. | Boolean | d. | Number |
|
|
|
119.
|
The six most common operators that produce Boolean
values are called the ____ operators.
a. | class | c. | relational | b. | logical | d. | arithmetic |
|
|
|
120.
|
Relational operators compare ____ values and produce an appropriate true or false value.
|
|
|
121.
|
In Alice, a(n) ____ statement is a flow control statement that directs
flow according to the value of a condition.
a. | doTogether | c. | select | b. | doInOrder | d. | if |
|
|
|
122.
|
When Alice encounters a ____ statement, it pauses the program’s flow, sets
an internal timer to a specified number of seconds, and starts this timer counting down towards
zero.
a. | wait() | c. | halt() | b. | pause() | d. | suspend() |
|
|
|
123.
|
The ____ statement directs a program’s flow through the statements
within it, while counting through a range of numbers.
a. | doTogether | c. | for | b. | if | d. | doInOrder |
|
|
|
124.
|
The ____ sign is the increment operator.
|
|
|
125.
|
The simple version of the Alice for statement always
begins counting with ____.
|
|
|
126.
|
If you need to count down in a loop, use a(n) ____ statement.
a. | doTogether | c. | if | b. | while | d. | do until |
|
|
|
127.
|
In ____ for statements, one for statement is used to control another for
statement.
a. | tiered | c. | nested | b. | stacked | d. | layered |
|
|
|
128.
|
The ____ statement can be used in any situation where repetition is
required.
a. | for | c. | forAllInOrder | b. | while | d. | forAllTogether |
|
|
|
129.
|
Mathematicians have discovered that many of the spirals that occur in nature use
a pattern given in the ____ series.
a. | Fibonacci | c. | Church | b. | Goedel | d. | Pythagorean |
|
|
|
130.
|
What number follows 55 in the series below?
1,
1, 2, 3, 5, 8, 13, 21, 34, 55, ____
|
|
|
131.
|
A(n) ____ can be used to store a group of data values.
a. | data structure | c. | String | b. | Number | d. | Object |
|
|
|
132.
|
You can use a single ____ to store multiple values, such as 12 songs.
a. | TextureMap | c. | array | b. | ReferenceFrame | d. | Sound |
|
|
|
133.
|
In Alice, a ____ stores a group of values where the group’s size changes
frequently.
a. | vector | c. | matrix | b. | list | d. | grid |
|
|
|
134.
|
The term ____ refers to a data element stored in Alice’s list data
structure.
a. | pointer | c. | dummy | b. | reference | d. | item |
|
|
|
135.
|
Alice uses ____to distinguish data structures from “normal”
variables.
a. | square brackets | c. | asterisks | b. | curved parentheses | d. | backslashes |
|
|
|
136.
|
In addition to the forAllInOrder and forAllTogether statements, Alice provides ____ that you can send
to a list variable to modify it or its items.
a. | routines | c. | procedures | b. | scripts | d. | messages |
|
|
|
137.
|
Each item in a list has a ____ by which it can be accessed.
a. | marker | c. | position | b. | flag | d. | handle |
|
|
|
138.
|
The list functions — size(), firstIndexOf(),
and lastIndexOf() — each return a(n) ____.
a. | Object | c. | String | b. | Number | d. | Boolean |
|
|
|
139.
|
To determine whether a list is empty, we can compare its ____ to
zero.
a. | address | c. | size | b. | name | d. | type |
|
|
|
140.
|
Aside from the list structure, Alice’s second data structure is called the
____.
a. | binary tree | c. | hash
table | b. | stack | d. | array |
|
|
|
141.
|
Arrays are ____ variables, meaning their items can be accessed using an index
value.
a. | random | c. | static | b. | indexed | d. | dynamic |
|
|
|
142.
|
The notation anArray[i] is called the ____
operation.
a. | subscript | c. | shifting | b. | assignment | d. | storage |
|
|
|
143.
|
The Random.nextDouble() function is a member of the
____ class.
a. | Light | c. | World | b. | Camera | d. | Ground |
|
|
|
144.
|
To select a random item from an array, you need to generate a(n) ____ for the
index i.
a. | subscript | c. | element | b. | random number | d. | component |
|
|
|
145.
|
If you wish to generate an integer using Random.nextDouble(), be sure to set the integerOnly
attribute to ____.
|
|
|
146.
|
In general, if you want to generate a random number from the range a through b, then you should specify a as the minimum value and ____ as the maximum value.
|
|
|
147.
|
In situations where you just need to retrieve one random item from a data
structure, a list and the ____ function provide an easy way to solve the problem.
a. | firstIndexOf() | c. | getLastItem() | b. | lastIndexOf() | d. | getRandomItem() |
|
|
|
148.
|
The components of an Alice Object are ____.
a. | attributes | c. | properties | b. | objects | d. | classes |
|
|
|
149.
|
A value named ____ denotes the absence of an Object.
a. | void | c. | null | b. | empty | d. | zero |
|
|
|
150.
|
If you deleted an object from your world to which your program was sending a
message, look through your program’s methods for statements in which a message is sent to
____.
a. | <None> | c. | <Nothing> | b. | <Null> | d. | <Deleted> |
|