Professional Documents
Culture Documents
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?
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
Mark for
Review
(1) Points
2
4
5 (*)
15
10
Correct
8. Which of the following programming instructions commands the
Mark for
Review
(1) Points
(*)
Correct
9. Which of the following statements about methods is false?
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
Mark for
Review
(1) Points
True (*)
False
Correct
12. From your Alice lessons, which of the following are
types of storyboards?
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?
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?
True (*)
False
Correct
16.In Alice,
Do In
Order
and Do
Together:
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?
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?
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
Mark for
Review
(1) Points
Mark for
Review
(1) Points
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
Mark for
Review
(1) Points
Mark for
Review
(1) Points
> (*)
<
==
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
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
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
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
Mark for
Review
(1) Points
Testing
Target (*)
Primary
Programmer
Correct