Вы находитесь на странице: 1из 16

1Which of the following programming instructions commands the 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?

Mark for
Review
(1) Points

(*)

Correct

2. From your Alice lessons, variables are fixed and cannot be changed. True or false?

Tru
e
False (*)
Incorrect. Refer to Section 2 Lesson 10.
3.
Which of the following is an example of nesting in an Alice program?
Text is
nested
inside of
a
commen
ts tile.
Distance, duration, and direction arguments are nested inside of a
procedure.
A move procedure is nested inside of a turn procedure.
Five Do Together statements are nested inside of a Do In Order
statement. (*)
Correct

4.
4. From your
Alice
lessons,
complete
the
following
sentence:
When
coded, an
event
triggers a
___________.

Mark for Review


(1) Points

Infinite loop
Gallery
Procedure (*)
Scene
Incorrect. Refer to Section 2 Lesson 11.

5. In Alice,
we use
the
WHILE
control
statemen
t to

Mark for Review


(1) Points

impleme
nt the
condition
al loop.
True or
false?
True (*)
False
Correct

6. Which
of the
followin
g is not
a valid
primitiv
e type
in Java?

Mark for Review


(1) Points

boolean
String (*)
long
int
double
Incorrect. Refer to Section 2 Lesson 13.

7. Results
of
arithmeti
c
operatio
ns
cannot
be
stored in
a
variable.
True or
false?

Mark for Review


(1) Points

True
False (*)
Correct

8. You have a Class representing Cat. Each Cat can meow, purr, catch
mice, and so on. When you create a new cat, what is it called?

Mark for
Review
(1) Points

A submethod
A subprogram
An instance (*)
A subclass
A variable class
Incorrect. Refer to Section 2 Lesson 14.
9. In Java, a function is a method that returns a value. True or false?

Mark for
Review
(1) Points

True (*)
False
Correct

10. From
your
Alice
lessons
, builtin
functio
ns
provide
precise
propert
y
details
for the
followin
g
areas:

Mark for Review


(1) Points

Proximity and size.


Distance to and nesting.
Proximity, size, spatial relation, and point of view. (*)
Proximity and point of view.
Incorrect. Refer to Section 2 Lesson 7.

11. From your Alice lessons, functional decomposition is the process of taking a complex problem
or process and growing it into larger parts that are easier to manage. True or false?

Tru
e
False (*)
Incorrect. Refer to Section 2 Lesson 12.

12. From your


Alice
lessons, at
what point
in the
animation
process do
you
confirm the
items on
the
"Checklist
for
Animation
Completion
"?

Mark for Review


(1) Points

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.

13. In Alice,
you can
define
your own
procedur
es for a
class, but
not your
own
functions
. True or
false?

Mark for Review


(1) Points

True

False (*)
Correct

14. In Alice, a
computer
program
requires
functions to
tell it how to
perform the
procedure.
True or false?

Mark for
Review
(1) Points

True
False (*)
Incorrec
t. Refer
to
Section
2
Lesson
6.
15. In Alice, the
setVehicle
procedure
will associate
one object to
another. True
or false?

Mark for
Review
(1) Points

True (*)
False
Correct

16. In Alice,
Do In
Order
and Do
Togethe
r:

Mark for Review


(1) Points

Are move statements


Are control statements (*)
Are complex statements
None of the above
Incorrect. Refer to Section 2 Lesson 6.

17. From your Alice lessons, a flowchart could be created in a software


program, or documented in a journal. True or false?

Mark for
Review
(1) Points

True (*)
False
Correct
18. 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
Incorrect. Refer to Section 2 Lesson 5.
19. In Alice, which of the following are benefits of separating out
motions into their own procedures?

Mark for
Review
(1) Points

(Choose all correct answers)


It makes the animation easier to run.
It makes the scene easier to view.
It simplifies code and makes it easier to read. (*)
It allows many objects of a class to use the same procedure.
(*)
It can allow subclasses of a superclass to use a procedure. (*)
Incorrect. Refer to Section 2 Lesson 5.
20. Alice uses built-in math operators; they are:

Mark for
Review
(1) Points

Add and subtract


Multiply and divide
All of the above (*)
None of the above

Incorrect. Refer to Section 2 Lesson 9.

21. In Alice,
which of
the
following
programmi
ng
statements
moves the
cat
backward,
half the
distance to
the bird?

Mark for Review


(1) Points

this.Cat move backward {this.Bird getDistanceTo this.Cat /


2}
this.Cat move forward {this.Bird getDistanceTo this.Cat /
2}
this.Bird move forward {this.Bird getDistanceTo this.Cat /
2}
this.Cat move backward {this.Cat getDistanceTo this.Bird /
2} (*)
Correct
22. From your Alice lessons, what is a one-shot procedural method?

Mark for
Review
(1) Points

A procedure that is invoked when the Run button is


clicked.
A procedure that is used to make a scene adjustment. (*)
A procedure that is dragged into the Code editor.
A procedure that is used to launch the program.
Correct

Section 3
(Answer all questions in this section)
23. From your Greenfoot lessons, classes can only use the methods
they have inherited. They cannot use methods from other
classes. True or false?

Mark for
Review
(1) Points

True
False (*)

Correct
24. From your Greenfoot lessons, which axes define an object's
position in a world?

Mark for
Review
(1) Points

(Choose all correct answers)


x (*)
z
y (*)
w
Correct
25. From your Greenfoot lessons, which programming statement
creates a new Duke object, and places it at x = 120, y = 100 in
the world?

Mark for
Review
(1) Points

addObject (new Duke( ), 120, 100); (*)


addClass (new Duke( ), 120, 100);
addWorld (new Duke( ), 120, 100);
Move(120,100);
Correct

26. From
your
Greenfoo
t lessons,
which
type of
construct
or can be
used to
automate
creation
of Actor
instances
?

Mark for Review


(1) Points

Animal
World (*)
Actor
Vector

Correct
27. In Greenfoot, a defined variable is a variable that is defined in an
instance. True or false?

Mark for
Review
(1) Points

True
False (*)
Incorrect. Refer to Section 3 Lesson 8.
28. Use your Greenfoot knowledge to answer the question: Where
are defined variables typically entered in a class's source code?

Mark for
Review
(1) Points

In the defined method in the source code.


Between the constructors and methods in the source code.
After the constructors and methods in the source code.
At the top of the source code, before the constructors and
methods. (*)
Incorrect. Refer to Section 3 Lesson 8.
29. Using the Greenfoot IDE, when is a constructor automatically
executed?

Mark for
Review
(1) Points

When source code is written.


When a new image is added to the class.
When a new instance of the class is created. (*)
When the act method is executed.
Incorrect. Refer to Section 3 Lesson 8.
30. From your Greenfoot lessons, which of the following are
properties of an instance?

Mark for
Review
(1) Points

Size
Color
Image file
Methods
All of the above (*)

Incorrect. Refer to Section 3 Lesson 2.

31. In
Greenfoot,
instances
inherit the
characteristi
cs of the
subclass
they belong
to, but not
the
superclass.
True or
false?

Mark for Review


(1) Points

True
False (*)
Correct
32. In the following Greenfoot method signature, which is the
method name?
void turnLeft()

Mark for
Review
(1) Points

()
void
turnLeft (*)
Left
Incorrect. Refer to Section 3 Lesson 2.
33. What type of Greenfoot method would be used to turn an
object?

Mark for
Review
(1) Points

orientTo( );
turnAround( );
move ( );
turn( ); (*)
Incorrect. Refer to Section 3 Lesson 2.
34. In Greenfoot, what happens if the condition is false in an ifstatement?

Mark for
Review
(1) Points

The programming statements are executed.


The if-statement is executed.
The act method is deleted.
The programming statements are not executed. (*)
Incorrect. Refer to Section 3 Lesson 3.
35. From your Greenfoot lessons, source code is written in the
Code editor. True or false?

Mark for
Review
(1) Points

True (*)
False
Correct

36. In Greenfoot,
dot notation
is used to call
a
_____________
from another
class.

Mark for Review


(1) Points

Method (*)
Class
Signature
Parameter
Correct
37. In Greenfoot, objects are created from:

Mark for
Review
(1) Points

Methods
Classes (*)
Signatures
Parameters
Correct

38. In Greenfoot, you may perform the programming tasks of


create and test many times. True or false?

Mark for
Review
(1) Points

True (*)
False
Correct
39. In the Greenfoot IDE, what symbols indicate that the variable
is an array?

Mark for
Review
(1) Points

Square brackets [ ] (*)


Curly brackets { }
Semicolon ;
Colon :
Incorrect. Refer to Section 3 Lesson
10.
40. In Greenfoot, a local variable is declared at the beginning of
a class. True or false?

Mark for
Review
(1) Points

True
False (*)
Correct

41. How would the following


sentence be written in
Greenfoot source code? If
Duke's leg is down, and the
keyboard key "d" is down...
if (&&isDown !
Greenfoot.isKeyDown("
d") )
if (!isDown &&
Greenfoot.isKeyDown("
d") )
if (isDown &&
Greenfoot.isKeyDown("
d") ) (*)

Mark for
Review
(1) Points

if (!
Greenfoot.isKeyDown
&& isDown("d") )
Correct
42. Use your Greenfoot
knowledge: An array object
holds a single variable. True
or false?

Mark for
Review
(1) Points

True
False (*)
Incorrect. Refer to
Section 3 Lesson 10.
43. 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
44. Which of the following are
examples of a Greenfoot
superclass?

Mark for
Review
(1) Points

(Choose all correct answers)


Dog
Cat
Parrot
Actor (*)
World (*)
Incorrect. Refer to
Section 3 Lesson 1.
45. When designing a game in
Greenfoot, it helps to define
the actions that will take
place in a textual
storyboard. True or false?
True (*)
False

Mark for
Review
(1) Points

Correct

46. In Greenfoot,
you will not
receive an
error message
if your code is
incorrect. It
will simply not
work, and you
will have to
determine why
the code
doesn't work.
True or false?

Mark for
Review
(1) Points

True
False (*)
Incorrect.
Refer to
Section 3
Lesson 4.
47. From your
Greenfoot
lessons,
abstraction
techniques can
only be used
once in a
class's source
code. True or
false?

Mark for
Review
(1) Points

True
False (*)
Correct
48. In Greenfoot,
what type of
parameter
does the
keyDown
method
expect?
String (*)
Boolean
Integer

Mark for
Review
(1) Points

Method
Incorrect.
Refer to
Section 3
Lesson 7.
49. From your
Greenfoot
lessons, how
do you call a
defined
method?

Mark for
Review
(1) Points

Call the
method
from the
act
method.
(*)
Call the
method
from the
defined
method.
Write the
method in
the World
superclass
.
Write the
method in
the
instance.
Write the
method in
the source
code.
Correct
50. In Greenfoot, a
way to have all
subclasses of a
superclass
inherit a
method is by
adding the
method to the
superclass.
True or false?
True (*)
False
Correct

Mark for
Review
(1) Points

Вам также может понравиться