You are on page 1of 14

1.

The
Comments
you enter
in Alice
should
describe
the
sequence
of actions
that take
place in
the code
segment.
True or
false?
True (*)
False

2. An Alice event is considered what?


Mark for Review
(1) Points
A party with at least 20 people.
An object's orientation.
Error handling.
A keystroke or mouse click. (*)

Correct
3. In Alice, which of the following programming statements
Mark for Review
moves the fish forward, the distance to the rock, minus the
(1) Points
depth of the rock?
this.Fish move forward {this.Rock getDistanceTo
this.Fish - this.Fish getDepth}
this.Fish move forward {this.Fish getDistanceTo
this.Rock - this.Rock getDepth} (*)
this.Fish move forward {this.Rock getDistanceTo
this.Fish - this.Fish - 2}
this.Rock move forward {this.Rock getDistanceTo
this.Fish - this.Fish - 2}
Correct
4. In Alice, we can avoid object collision using what?
Mark for Review
(1) Points
Slowing movements down.
Using math operators. (*)
Downloading the Alice 3 collision detector app.
Using object detection.

Correct
5. A loop can be infinite (continue forever) or conditional
Mark for Review
(stops upon a condition). True or false?
(1) Points
True (*)
False

Correct

6In
Mark for
.Alice,
Review
how is
(1) Points
a one-
shot
procedu
re
differen
t from
procedu
res in
the
Code
editor?
One-shot procedures are only available for acting objects, while
procedures are available for all objects.
One-shot procedures are available in the Code editor, while
procedures are available in the Scene editor.
A one-shot procedure executes only one time to re-position the
object, while procedures in the Code editor execute every time
the Run button is clicked. (*)
All of the above

7. Define the value of the variable LapCount based on the following


Mark for
math calculation: LapCount + 10 = 15
Review
(1) Points
2
4
5 (*)
15
10

Correct
8. Which of the following programming instructions commands the
Mark for
fish to continuously move forward a random speed between 0.5 and Review
1.0 meters, minus 0.25 meters, until it collides with the shark? (1) Points

(*)

Correct
9. Which of the following statements about methods is false?
Mark for
Review
(1) Points
Classes must be defined directly within a method definition. (*)
Methods whose return type is not void are required to include a
return statement specifying what to return.
The order in which methods are listed within the class is not
important.
Java does not permit nesting one method definition within
another method's definition.
Correct
10. If you want one message to display if a user is below the age of 18
Mark for
and a different message to display if the user is 18 or older, what
Review
type of construct would you use?
(1) Points
for all loop
do loop
while loop
if (*)

11.In Alice,
Mark for
declaring a
Review
new
(1) Points
procedure
to shorten
code and
make it
easier to
read is a
procedural
abstraction
technique.
True or
false?
True (*)
False

Correct
12. From your Alice lessons, which of the following are
Mark for Review
types of storyboards?
(1) Points
(Choose all correct answers)
Actual
Textual (*)
Factual
Visual (*)
Fictional

Correct
13. Before you can begin to develop the animation
Mark for Review
storyboard, what must be defined?
(1) Points
The code
The debugging process
The scenario (*)
The control statements

Correct
14. In Alice, the setVehicle procedure will associate one
Mark for Review
object to another. True or false?
(1) Points
True (*)
False

Correct
15. In Alice, the procedures' arguments allow the
Mark for Review
programmer to adjust the object, motion, distance
(1) Points
amount, and time duration. True or false?
True (*)
False

Correct
16.In Alice,
Mark for Review
Do In
(1) Points
Order
and Do
Together:
Are move statements
Are control statements (*)
Are complex statements
None of the above

Correct
17. Which Alice execution task corresponds with the
Mark for Review
following storyboard statement?
(1) Points
Cat turns to face mouse.
this.mouse turnToFace this.cat
mouse turnTo cat
this.cat turnToFace this.mouse (*)
cat TurnTo mouse

Correct
18. From your Alice lessons, at what point in the animation
Mark for Review
process do you confirm the items on the "Checklist for
(1) Points
Animation Completion"?
Before designing the animation.
During and after the animation process. (*)
At the beginning of the animation process.
After adding each procedure to the Code editor.

Correct
19. From your Alice lessons, when testing your animation,
Mark for Review
you should test that comments were added below each
(1) Points
sequence of instructions in the code. True or false?
True
False (*)

Incorrect. Refer to Section 2


Lesson 12.
20. A typical application uses various values and these values
Mark for Review
continuously change while the program is running. True
(1) Points
or false?
True (*)
False

Correct
21.If the value
Mark for
already
Review
exists in
(1) Points
the variable
it is
overwritten
by the
assignment
operator
(=). True
or false?
True (*)
False

Correct
22. Functions answer questions about an object, such as its
Mark for
height, width, depth and even distance to another object.
Review
True or false?
(1) Points
True (*)
False
Section 3
(Answer all questions in this section)
23. From your Greenfoot lessons, the reset button resets the
Mark for
scenario back to its initial position. True or false?
Review
(1) Points
True (*)
False

Correct
24. In Greenfoot, which of the following are execution
Mark for
controls?
Review
(1) Points
(Choose all correct answers)
Run (*)
Act (*)
Speed (*)
Move
Turn

Correct
25. From your Greenfoot lessons, in an if-statement, the
Mark for
programming statements written in curly brackets are
Review
executed simultaneously. True or false?
(1) Points
True
False (*)

Correct
26.In
Mark for
Greenfoot,
Review
a method
(1) Points
with what
kind of
return type
is used to
learn more
about an
object's
orientation?
non-void return type (*)
void return type
object return type
method return type
27. How would the following sentence be written in
Mark for
Greenfoot source code? If Duke's leg is down, and the
Review
keyboard key "d" is down...
(1) Points
if (&&isDown ! Greenfoot.isKeyDown("d") )
if (!isDown && Greenfoot.isKeyDown("d") )
if (isDown && Greenfoot.isKeyDown("d") ) (*)
if (!Greenfoot.isKeyDown && isDown("d") )

Correct
28. In Greenfoot, which of the following statements could
Mark for
prevent an infinite loop from occurring?
Review
(1) Points
I = 100 + i
i=1
i=i
i = i + 1 (*)

Correct
29. In Greenfoot, what type of symbol is used to connect
Mark for
boolean expressions?
Review
(1) Points
String concatenation
Logic operators (*)
Integers
Keyboard key names

.
30. In the following Greenfoot array, what statement would
Mark for
you write to access the "a" key?
Review
(1) Points
Keynames = {"a", "b", "c", "d"};
keynames[2]
keynames["a"]
keynames[0] (*)
keynames["a" key]

Correct
31.From your Greenfoot lessons,
Mark for
what is the parameter of the
Review
following constructor that creates
(1) Points
a new image, and designates it to
the Actor class?
setImage (new
GreenfootImage("duke100.png"));
setImage
GreenfootImage
duke100.png (*)
new

Correct
32. Specific to the Greenfoot IDE,
Mark for
which of the following stop
Review
methods is written correctly?
(1) Points
stop.Greenfoot( );
Greenfoot(stop);
Greenfoot.stop( ); (*)
Greenfoot.stop(key);

Correct
33. In Greenfoot, a defined variable
Mark for
is a variable that is defined in an
Review
instance. True or false?
(1) Points
True
False (*)

Correct
34. In Greenfoot, which method
Mark for
checks if a key on the keyboard
Review
has been pressed?
(1) Points
keyPress method
keyUp method
keyDown method (*)
keyClick method

Correct
35. Read the following method
Mark for
signature. Using your Greenfoot
Review
experience, what does this
(1) Points
method do?

public static int


getRandomNumber (int limit)
Returns a random number
less than 10.
Returns a random coordinate
position in the world.
Returns a random number
between zero and parameter
limit. (*)
Returns a random number for
instances in the animal class
only.
Correct
36.From
Mark for
your
Review
Greenfoot
(1) Points
lessons,
what can
methods
belong
to?
(Choose all correct answers)
Galleries
Classes (*)
Scenarios
Objects (*)
All of the above

Correct
37. From your Greenfoot lessons, which of the following is
Mark for
not a characteristic of a static method?
Review
(1) Points
Belongs to a class itself
Belongs to an instance itself (*)
Available for other classes to use with dot notation
Signature contains the word static
Is a method

38. From your Greenfoot lessons, which of the following


Mark for
comparison operators represents "greater than"?
Review
(1) Points
> (*)
<
==
!=

Correct
39. From your Greenfoot lessons, to save space in the act
Mark for
method, you can write an entirely new method below it,
Review
called a _____________.
(1) Points
Class method
Instance method
Defined method (*)
World method
Code method

Correct
40. In Greenfoot, defined methods must be used immediately.
Mark for
True or false?
Review
(1) Points
True
False (*)

Correct
4From
Mark for Review
1. your
(1) Points
Greenfo
ot
lessons,
which of
the
followin
g is an
example
of
changin
g the
environ
ment
during a
Q/A test
cycle?
Use a different operating system. (*)
Use the mouse instead of the keyboard.
Use symbols instead of numbers.
All of the above.
42. In Greenfoot, the image below is an example of what construct?
Mark for
Review
(1) Points

Method
Comment
Constructor (*)
Class

Correct
43. From your Greenfoot lessons, which of the following is an example
Mark for
of changing test data during a Q/A test cycle?
Review
(1) Points
Use a different operating system.
Use the mouse instead of the keyboard.
Use symbols instead of numbers. (*)
All of the above.

Correct
44. In Greenfoot, the properties of an instance can be modified in the
Mark for
documentation. True or false?
Review
(1) Points
True
False (*)

Correct
45. From your Greenfoot lessons, instances do not have any memory.
Mark for
True or false?
Review
(1) Points
True
False (*)

Correct
46.In the
Mark for Review
following
(1) Points
Greenfoot
method
signature,
which is
the
method
name?

void
turnLeft()
()
void
turnLeft (*)
Left

Correct
47. In the Greenfoot IDE, which of the following is not a
Mark for
property of an instance?
Review
(1) Points
Position
Inherited methods
Scenario name (*)
Defined methods

Correct
48. Use your Greenfoot knowldege: Abstraction occurs in
Mark for
many different ways in programming. True or false?
Review
(1) Points
True (*)
False

Correct
49. From your Greenfoot lessons, how do you test that your
Mark for
code does not contain bugs?
Review
(1) Points
Write the code.
Inspect the instances.
Review the documentation.
Compile the code. (*)

Correct
50. Which of the following type of audience should you ask
Mark for
to play your Greenfoot game during the testing phase?
Review
(1) Points
Testing
Target (*)
Primary
Programmer

Correct

You might also like