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
moves the fish forward, the distance to the rock, minus the
depth of the rock?

Mark for Review


(1) Points

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?

Slowing movements down.


Using math operators. (*)
Downloading the Alice 3 collision detector app.

Mark for Review


(1) Points

Using object detection.


Correct
5. A loop can be infinite (continue forever) or conditional
(stops upon a condition). True or false?

Mark for Review


(1) Points

True (*)
False
Correct
6In
.Alice,
how is
a oneshot
procedu
re
differen
t from
procedu
res in
the
Code
editor?

Mark for
Review
(1) Points

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
math calculation: LapCount + 10 = 15

Mark for
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


1.0 meters, minus 0.25 meters, until it collides with the shark?

Review
(1) Points

(*)

Correct
9. Which of the following statements about methods is false?

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.

Mark for
Review
(1) Points

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
and a different message to display if the user is 18 or older, what
type of construct would you use?

Mark for
Review
(1) Points

for all loop


do loop
while loop
if (*)
11.In Alice,
declaring a
new
procedure
to shorten
code and
make it
easier to
read is a
procedural
abstraction
technique.
True or
false?

Mark for
Review
(1) Points

True (*)
False
Correct
12. From your Alice lessons, which of the following are
types of storyboards?

Mark for Review


(1) Points

(Choose all correct answers)


Actual
Textual (*)
Factual
Visual (*)
Fictional
Correct
13. Before you can begin to develop the animation
storyboard, what must be defined?

Mark for Review


(1) Points

The code
The debugging process
The scenario (*)
The control statements
Correct
14. In Alice, the setVehicle procedure will associate one
object to another. True or false?

Mark for Review


(1) Points

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

Mark for Review


(1) Points

True (*)
False
Correct
16.In Alice,
Do In
Order
and Do
Together:

Mark for Review


(1) Points

Are move statements


Are control statements (*)
Are complex statements
None of the above
Correct
17. Which Alice execution task corresponds with the
following storyboard statement?

Mark for Review


(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
process do you confirm the items on the "Checklist for

Mark for Review


(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,
you should test that comments were added below each
sequence of instructions in the code. True or false?

Mark for Review


(1) Points

True
False (*)
Incorrect. Refer to Section 2
Lesson 12.
20. A typical application uses various values and these values
continuously change while the program is running. True
or false?

Mark for Review


(1) Points

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

Mark for
Review
(1) Points

True (*)
False
Correct
22. Functions answer questions about an object, such as its
height, width, depth and even distance to another object.
True or false?
True (*)
False

Mark for
Review
(1) Points

Section 3
(Answer all questions in this section)
23. From your Greenfoot lessons, the reset button resets the
scenario back to its initial position. True or false?

Mark for
Review
(1) Points

True (*)
False
Correct
24. In Greenfoot, which of the following are execution
controls?

Mark for
Review
(1) Points

(Choose all correct answers)


Run (*)
Act (*)
Speed (*)
Move
Turn
Correct
25. From your Greenfoot lessons, in an if-statement, the
programming statements written in curly brackets are
executed simultaneously. True or false?
True
False (*)
Correct
26.In
Greenfoot,
a method
with what
kind of
return type
is used to
learn more
about an
object's
orientation?

Mark for
Review
(1) Points

non-void return type (*)


void return type
object return type
method return type

Mark for
Review
(1) Points

27. How would the following sentence be written in


Greenfoot source code? If Duke's leg is down, and the
keyboard key "d" is down...

Mark for
Review
(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
prevent an infinite loop from occurring?

Mark for
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
boolean expressions?

Mark for
Review
(1) Points

String concatenation
Logic operators (*)
Integers
Keyboard key names
.
30. In the following Greenfoot array, what statement would
you write to access the "a" key?
Keynames = {"a", "b", "c", "d"};
keynames[2]
keynames["a"]
keynames[0] (*)
keynames["a" key]
Correct
31.From your Greenfoot lessons,
what is the parameter of the
following constructor that creates
a new image, and designates it to
the Actor class?

Mark for
Review
(1) Points

Mark for
Review
(1) Points

setImage (new
GreenfootImage("duke100.png"));
setImage
GreenfootImage
duke100.png (*)
new
Correct
32. Specific to the Greenfoot IDE,
which of the following stop
methods is written correctly?

Mark for
Review
(1) Points

stop.Greenfoot( );
Greenfoot(stop);
Greenfoot.stop( ); (*)
Greenfoot.stop(key);
Correct
33. In Greenfoot, a defined variable
is a variable that is defined in an
instance. True or false?

Mark for
Review
(1) Points

True
False (*)
Correct
34. In Greenfoot, which method
checks if a key on the keyboard
has been pressed?

Mark for
Review
(1) Points

keyPress method
keyUp method
keyDown method (*)
keyClick method
Correct
35. Read the following method
signature. Using your Greenfoot
experience, what does this
method do?
public static int
getRandomNumber (int limit)
Returns a random number

Mark for
Review
(1) Points

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
your
Greenfoot
lessons,
what can
methods
belong
to?

Mark for
Review
(1) Points

(Choose all correct answers)


Galleries
Classes (*)
Scenarios
Objects (*)
All of the above
Correct
37. From your Greenfoot lessons, which of the following is
not a characteristic of a static method?

Mark for
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


comparison operators represents "greater than"?

> (*)
<
==

Mark for
Review
(1) Points

!=
Correct
39. From your Greenfoot lessons, to save space in the act
method, you can write an entirely new method below it,
called a _____________.

Mark for
Review
(1) Points

Class method
Instance method
Defined method (*)
World method
Code method
Correct
40. In Greenfoot, defined methods must be used immediately.
True or false?

True
False (*)
Correct
4From
1. your
Greenfo
ot
lessons,
which of
the
followin
g is an
example
of
changin
g the
environ
ment
during a
Q/A test
cycle?

Mark for Review


(1) Points

Use a different operating system. (*)


Use the mouse instead of the keyboard.
Use symbols instead of numbers.
All of the above.

Mark for
Review
(1) Points

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
of changing test data during a Q/A test cycle?

Mark for
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
documentation. True or false?

Mark for
Review
(1) Points

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

True
False (*)
Correct
46.In the
following
Greenfoot
method
signature,

Mark for Review


(1) Points

Mark for
Review
(1) Points

which is
the
method
name?
void
turnLeft()
()
void
turnLeft (*)
Left
Correct
47. In the Greenfoot IDE, which of the following is not a
property of an instance?

Mark for
Review
(1) Points

Position
Inherited methods
Scenario name (*)
Defined methods
Correct
48. Use your Greenfoot knowldege: Abstraction occurs in
many different ways in programming. True or false?

Mark for
Review
(1) Points

True (*)
False
Correct
49. From your Greenfoot lessons, how do you test that your
code does not contain bugs?

Mark for
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
to play your Greenfoot game during the testing phase?

Mark for
Review
(1) Points

Testing
Target (*)
Primary
Programmer
Correct

You might also like