Sei sulla pagina 1di 13

Section 2

(Answer all questions in this section)


1. From your Alice lessons, random numbers are numbers generated by the user with
a pattern in their sequence. True or false?

Mark for Review


(1) Points

True
False (*)
Incorrect. Refer to Section 2 Lesson 4.
2. Which of the following is not an Alice variable value type?

Mark for Review


(1) Points

Color
Decimal Number
Whole Number
Function (*)
Incorrect. Refer to Section 2 Lesson 10.
3. A variable is a named location inside the computer's memory; once there, the
information can be retrieved and changed. True or false?

Mark for Review


(1) Points

True (*)
False
Correct
4. 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}
Incorrect. Refer to Section 2 Lesson 9.
5. Identify an example of an Alice expression.

Mark for Review


(1) Points

"I feel happy."


If or Where
3x3=9 (*)
None of the above
Correct
6. From your Alice
lessons,
complete the
following
sentence:
When coded,
an event
triggers a
___________.

Mark for Review


(1) Points

Infinite loop
Gallery
Procedure (*)
Scene
Correct
7. The Alice IF control structure requires the false statement to be
populated. True or false?

Mark for Review


(1) Points

True
False (*)
Correct
8. All objects in Alice have three dimensional coordinates on which axes?

Mark for Review


(1) Points

(Choose all correct answers)


x (*)
y (*)
z (*)
w
All of the above
Correct

9. 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?

Mark for Review


(1) Points

True
False (*)
Incorrect. Refer to Section 2 Lesson 12.
10. From your Alice lessons, animations should be tested by the
programmer before they are considered complete. True or false?

Mark for Review


(1) Points

True (*)
False
Incorrect. Refer to Section 2 Lesson 12.
11. When you
want
specific
code to be
executed
only if
certain
conditions
are met,
what type
of Java
construct
would you
use?

Mark for Review


(1) Points

while loop
if (*)
array
boolean
Correct
12. 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

13. In Alice, procedural abstraction is the concept of making code easier to


understand and reuse. True or false?

Mark for Review


(1) Points

True (*)
False
Correct
14. 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
Incorrect. Refer to Section 2 Lesson 5.
15. Defining the scenario, and the Alice animation to represent the scenario,
is the first step to programming your animation. True or false?

Mark for Review


(1) Points

True (*)
False
Incorrect. Refer to Section 2 Lesson 5.
16. Which of
the
following
actions
would
require a
control
statement
to control
animation
timing?

Mark for Review


(1) Points

(Choose all correct answers)


A biped object walking. (*)
A rock object turning.
A fish swimming. (*)

A bird flying. (*)


Correct
17. 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
18. In Alice, the setVehicle procedure will associate one object to another.
True or false?

Mark for Review


(1) Points

True (*)
False
Correct
19. Which of the following does not describe variables?

Mark for Review


(1) Points

A place in memory where data of a specific type can be stored for


later retrieval and use.
Has a unique name.
Has a type associated with it.
Arranged in rows and columns. (*)
Correct
20. The following are examples of what in Java?
boolean
bite
char
short
int
long
float
double
Types (*)
Expressions
Variables

Mark for Review


(1) Points

Specifications
Incorrect. Refer to Section 2 Lesson 13.
21. The move
procedure
in Alice
moves an
object in
how many
different
possible
directions?

Mark for Review


(1) Points

1
4
3
6 (*)
Correct
22. From your Alice lessons, which programming instruction represents the
following movement: A cat moves forward double (or twice) the distance
to the tree.

Mark for Review


(1) Points

this.Cat move Forward this.Cat getDistanceTo this.tree - 2.0


this.Cat move Forward this.Cat getDistanceTo this.tree / 2.0
this.Cat move Forward this.Cat getDistanceTo this.tree * 2.0 (*)
this.Cat move forward this.Cat getDistanceTo this.tree + 2.0
Correct

Section 3
(Answer all questions in this section)
23. From your Greenfoot lessons, which of the following is an example of a
type of data passed through a parameter?

Mark for Review


(1) Points

Methods
Classes
Integers (*)
Scenarios
Correct

24. From the Greenfoot IDE, where are inherited methods located?

Mark for Review


(1) Points

In the computer network


In the Greenfoot image gallery
In the Scene editor
In the documentation (*)
Incorrect. Refer to Section 3 Lesson 2.
25. What type of Greenfoot method would be used to turn an object?

Mark for Review


(1) Points

orientTo( );
turnAround( );
move ( );
turn( ); (*)
Correct
From your
26. Greenfoot
lessons,
instances
do not
have any
memory.
True or
false?

Mark for Review


(1) Points

True
False (*)
Correct
27. From your Greenfoot lessons, which type of constructor can be used to
automate creation of Actor instances?

Mark for Review


(1) Points

Animal
World (*)
Actor
Vector
Correct

28. From your Greenfoot lessons, which of the following comparison operators
represents "greater than"?

Mark for Review


(1) Points

> (*)
<
==
!=
Correct
29. 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
30. Read the following method signature. Using your Greenfoot experience,
what does this 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
31. In
Greenfoot,
what is a
common
letter used
for the
loop
variable?

Mark for Review


(1) Points

A
I (*)
X
Y

Mark for Review


(1) Points

Correct
32. In Greenfoot, when is a local variable most often used?

Mark for Review


(1) Points

Within the scenario


Within the act method
Within the world constructor
Within loop constructs (*)
Correct
33. Use your Greenfoot knowledge: An array object holds a single variable.
True or false?

Mark for Review


(1) Points

True
False (*)
Correct
34. In Greenfoot, what happens if the end to a while loop isn't established?

Mark for Review


(1) Points

The code will keep executing and will never stop. (*)
The code will execute once and then stop, due to controls in
Greenfoot.
The code will prompt you to enter a loop counter.
The code will not execute.
Correct
35. 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
36. From your
Greenfoot
lessons,

Mark for Review


(1) Points

which of the
following is
an example
of changing
the
environment
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.
Correct
37. Programming tasks to create a Greenfoot game typically occur in the
following order:

Mark for Review


(1) Points

1.Define the problem.


2.Design the solution.
3.Program the solution.
4.Test the solution.
True or false?
True (*)
False
Correct
38. From your Greenfoot lessons, what are the ways that you can view a
class's methods?

Mark for Review


(1) Points

(Choose all correct answers)


In the scenario
In the class's documentation (*)
By right-clicking on an instance (*)
In the Greenfoot gallery
Correct
39. From your Greenfoot lessons, where do you review a class's inherited
methods?

Mark for Review


(1) Points

Act method
Documentation (*)

Inspector
If-statement
Correct
40. Using the Greenfoot IDE, which of the following programming
statements tells the object to turn 38 degrees?

Mark for Review


(1) Points

move():
move(2);
turn(38); (*)
turn(38):
Correct
From
41. 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
42. In Greenfoot, which of the following are execution controls?

Mark for Review


(1) Points

(Choose all correct answers)


Run (*)
Act (*)
Speed (*)
Move
Turn
Incorrect. Refer to Section 3 Lesson 1.

43. In Greenfoot, you must first create an instance before you create a class.
True or false?

Mark for Review


(1) Points

True
False (*)
Correct
44. We can use the Actor constructor to automatically create Actor instances
when the Greenfoot world is initialized. True or false?

Mark for Review


(1) Points

True
False (*)
Correct
45. From your Greenfoot lessons, where should the stop method be inserted
into the source code?

Mark for Review


(1) Points

In the defined method.


In the act method. (*)
In the import statement.
In the class header.
Incorrect. Refer to Section 3 Lesson 8.
46. 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.

47. From your Greenfoot lessons, which of the following are examples of
abstraction?

Mark for Review


(1) Points

(Choose all correct answers)


Playing a range of sounds when keyboard keys are pressed. (*)
A single instance displays a single image.
Assigning a different keyboard key to each instance. (*)
Programming a single movement for a single instance.
Assigning a different image file to each instance. (*)
Incorrect. Refer to Section 3 Lesson 9.
48. Greenfoot does not have tools to record sound. True or false?

Mark for Review


(1) Points

True
False (*)
Correct
49. 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?

Mark for Review


(1) Points

True (*)
False
Correct
50. Use your Greenfoot knowledge to answer the question. One reason to
write a defined method in a class is to change the behavior of the class.
True or false?
True
False (*)
Incorrect. Refer to Section 3 Lesson 6.

Mark for Review


(1) Points

Potrebbero piacerti anche