Você está na página 1de 39

Which Alice control statement executes a set of procedures simultaneously?

Mark
for Review
Together
Do together (*)
Do in order
While
2. Which Alice execution task corresponds with the following storyboard statemen
t?
Cat rolls to the left.
Mark for Review
roll Left 1
this.Cat roll Left 1.0 (*)
Cat roll Left 1
Cat roll Right 1
Correct
3. In Alice, control statements are dragged into the Code editor. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
4. In Alice, the while control statement executes a set of procedures a specific
number of times.
True or false?
Mark for Review
(1) Points
True
False (*)
Correct
5. In Alice, the computer specifies the low and high range values for the range
of numbers from
which to pull a randomized number. True or false?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 4.
6. In Alice, which of the following arguments could be replaced with a random nu
mber? Mark for Review
(1) Points
(Choose all correct answers)
Distance (*)
Object name
Duration (*)
Direction
Procedure name
1. In Alice, which of the following is not a control statement? Mark for Review
(1) Points
Do In Order
While
Count
Move (*)
Incorrect. Refer to Section 2 Lesson 6.
2. In Alice, which control statement is used to invoke simultaneous movement? Ma
rk for Review
(1) Points

Do Together (*)
Do In Order
While
Count
Variable
Incorrect. Refer to Section 2 Lesson 6.
3. In Alice, a walking motion for a bipedal object
o Together control
statement. True or false?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 6.
4. In Alice, different programming is not required
e all objects move
the same way. True or false?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 6.
5. In Alice, when two objects are synchronized and
t one object is: Mark for Review
(1) Points
A vehicle of another (*)
A class of another
An object of another
An instance of another
Incorrect. Refer to Section 2 Lesson 6.
6. In Alice, which procedure is used to assign one
her? Mark for Review
(1) Points
setClassVehicle
setObjectVehicle
setVehicle (*)
Vehicle
Correc

can be achieved without the D

for different objects, becaus

move together, this means tha

object as the vehicle of anot

1. In Alice, where can you view the list of functions available for an object? M
ark for Review
(1) Points
Class description in the Scene editor.
Functions tab in the methods panel. (*)
Instance pull-down menu.
Properties tab in the methods panel.
Correct
2. In Alice, functions ask questions about an object. True or false? Mark for Re
view
(1) Points
True
False (*)
Correct
In Alice, the If control structure can process one true and one false response.
True or false? Mark for Review
(1) Points
True (*)
False
Correct

2. The Alice If control structure requires the false statement to be populated.


True or false? Mark for Review
(1) Points
True
False (*)
Correct
3. A conditional loop is a loop that will continue forever. True or false? Mark
for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 8.
4. In Alice, we use the While control statement to implement the conditional loo
p. True or false? Mark for Review
(1) Points
True (*)
False
An example of an expression is: Mark for Review
(1) Points
"I feel happy."
If or Where
3x3=9 (*)
Move forward 1 meter
Incorrect. Refer to Section 2 Lesson 9.
2. Alice uses built-in math operators. They are: Mark for Review
(1) Points
Add
Subtract
Multiply
Divide
All of the above (*)
Incorrect. Refer to Section 2 Lesson 9.
3. In Alice, which of the following programming statements moves the alien backw
ard the distance
to the asteroid, minus 2 meters?
Mark for Review
(1) Points
this.Alien move backward {this.Alien getDistanceTo this.Asteroid -2} (*)
this.Alien move backward {this.Alien getDistanceTo this.Asteroid * 2}
this.Asteroid move backward {this.Alien getDistanceTo this.Asteorid / 2}
this.Alien move forward {this.Asteroid getDistanceTo this.Alien / 2}
Incorrect. Refer to Section 2 Lesson 9.
4. In Alice, which of the following programming statements moves the cat forward
the distance to
the bird?
Mark for Review
(1) Points
this.Cat move forward {this.Bird getDistanceTo this.Cat / 2}
this.Cat move {this.Bird getDistanceTo this.Cat / 2}
this.Bird move forward {this.Bird getDistanceTo this.Cat}
this.Cat move forward {this.Cat getDistanceTo this.Bird} (*
Which is an example of the Boolean variable type? Mark for Review
(1) Points
3
Hello World
True or False (*)
An object

Correct
2. The initializer of a variable with a TextString value type could be (select a
ll that apply): Mark for Review
(1) Points
(Choose all correct answers)
"Greetings" (*)
"Howdy" (*)
"4" (*)
None of the above.
With keyboard controls, you can create Alice animations where the user controls
an object that
interacts with other objects. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
2. Event listeners look for and resopnd to the interactivity of the computer. Tr
ue or false? Mark for Review
(1) Points
True
False (*)
As the Alice programmer, you render the animation on your own. True or false? Ma
rk for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 12.
2. In Alice, what are the forms of a scenario? Mark for Review
(1) Points
(Choose all correct answers)
A section of code to write.
A problem to solve. (*)
A task to perform. (*)
A person to help.
A system to start.
Incorrect. Refer to Section 2 Lesson 12.
3. What can be used as a guideline to ensure your Alice animation fulfills anima
tion principles? Mark for Review
(1) Points
The Internet
An animation checklist (*)
A close friend
Other programmers
Correct
4. The animation checklist helps you confirm that all elements of the Alice anim
ation are operating
as expected. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
5. Which of the following elements of the Alice animation should be tested befor
e the animation is
considered complete?
Mark for Review
(1) Points

Math calculations operate as expected.


Objects move with smooth timing.
Comments are added to each sequence of instructions.
Control statements are operating as expected.
All of the above. (*)
Incorrect. Refer to Section 2 Lesson 12.
6. The Alice animation should be tested throughout development, not just at the
end of the
animation's development. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
7. What type of Alice listener object is required to target a mouse-click on any
object in the scene,
allowing the user to drag that object around the scene when the animation is run
ning?
Mark for Review
(1) Points
addDefaultManipulation procedure
addMouseListener procedure
addDefaultModelManipulation procedure (*)
addListener procedure
http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y
1 of 2 3/27/2015 5:49 AM
Correct
8. In which Alice class is the addDefaultModelManipulation procedure located? Ma
rk for Review
(1) Points
Object class
Scene class (*)
myFirstMethod class
Quadruped class
Incorrect. Refer to Section 2 Lesson 12.
9. When presenting your Alice animation, ensure that your presentation is thorou
ghly tested and
complete. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
10. When presenting your Alice animation, it is not important to give the audien
ce a reason to listen
to the presentation. True or false?
Mark for Review
(1) Points
True
False (*)
As the Alice programmer, you render the animation on your own. True or false? Ma
rk for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 12.
2. In Alice, what are the forms of a scenario? Mark for Review
(1) Points
(Choose all correct answers)

A section of code to write.


A problem to solve. (*)
A task to perform. (*)
A person to help.
A system to start.
Incorrect. Refer to Section 2 Lesson 12.
3. What can be used as a guideline to ensure your Alice animation fulfills anima
tion principles? Mark for Review
(1) Points
The Internet
An animation checklist (*)
A close friend
Other programmers
Correct
4. The animation checklist helps you confirm that all elements of the Alice anim
ation are operating
as expected. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
5. Which of the following elements of the Alice animation should be tested befor
e the animation is
considered complete?
Mark for Review
(1) Points
Math calculations operate as expected.
Objects move with smooth timing.
Comments are added to each sequence of instructions.
Control statements are operating as expected.
All of the above. (*)
Incorrect. Refer to Section 2 Lesson 12.
6. The Alice animation should be tested throughout development, not just at the
end of the
animation's development. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
7. What type of Alice listener object is required to target a mouse-click on any
object in the scene,
allowing the user to drag that object around the scene when the animation is run
ning?
Mark for Review
(1) Points
addDefaultManipulation procedure
addMouseListener procedure
addDefaultModelManipulation procedure (*)
addListener procedure
http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y
1 of 2 3/27/2015 5:50 AM
Correct
8. In which Alice class is the addDefaultModelManipulation procedure located? Ma
rk for Review
(1) Points
Object class
Scene class (*)
myFirstMethod class

Quadruped class
Incorrect. Refer to Section 2 Lesson 12.
9. When presenting your Alice animation, ensure that your presentation is thorou
ghly tested and
complete. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
10. When presenting your Alice animation, it is not important to give the audien
ce a reason to listen
to the presentation. True or false?
Mark for Review
(1) Points
True
False (*)
In Greenfoot, what happens to an instance when the Act button is clicked in the
environment? Mark for Review
(1) Points
Only one instance moves until the pause button is clicked.
The instance executes all of the programming statements in their class's act met
hod once.
(*)
The instance executes all of the programming statements in their class's act met
hod
repeatedly until the scenario is stopped.
The instance executes all of the programming statements in their class's act met
hod two
times until the scenario is stopped.
The class executes all of the programming statements in their instance's act met
hod two
times until the scenario is stopped.
Incorrect. Refer to Section 3 Lesson 1.
2. In Greenfoot, the Run button repeatedly executes all of the programming state
ments inthe
class's act method in sequential order until the pause button is clicked. True o
r false?
Mark for Review
(1) Points
True (*)
False
Correct
3. An object is an instance of a class. True or false? Mark for Review
(1) Points
True (*)
False
Correct
4. In Greenfoot, the class holds the general attributes of an instance, such as
the methods it
inherits. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
5. A subclass has what kind of relationship to a superclass? Mark for Review
(1) Points

"for-what"
"a-is"
"is-a" (*)
"is-by"
Incorrect. Refer to Section 3 Lesson 1.
6. What does an instance of the World class do? Mark for Review
(1) Points
Provide the acting objects for the scenario.
Provide the background scenery for the scenario. (*)
Provide the superclass for acting objects.
Provide the source code for instances.
Correct
7. In Greenfoot, after a subclass is created, what has to occur before instances
can be added to
the scenario?
Mark for Review
(1) Points
Creation of an instance
Compilation (*)
Creation of source code
Editing of source code
http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y
1 of 2 3/27/2015 5:51 AM
Correct
8. In Greenfoot, after a subclass is created and compiled, you cannot edit the s
ubclass's source
code. True or false?
Mark for Review
(1) Points
True
False (*)
In Greenfoot, the move method expects what type of information in its parameters
? Mark for Review
(1) Points
Degrees to turn
True or false response
String statement
Integer of steps to move forward (*)
Incorrect. Refer to Section 3 Lesson 2.
2. In Greenfoot, the turn method expects what type of information in its paramet
ers? Mark for Review
(1) Points
Degrees to turn (*)
True or false response
String statement
Integer of steps to move forward
Parameter void
Incorrect. Refer to Section 3 Lesson 2.
3. Using the Greenfoot IDE, only five instances can be added to a scenario. True
or false? Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 2.
4. In Greenfoot, the instance has a source code editor. True or false? Mark for
Review
(1) Points
True
False (*)

Incorrect. Refer to Section 3 Lesson 2.


5. In the Greenfoot IDE, an instance's position is on the x and y coordinates. T
rue or false? Mark for Review
(1) Points
True (*)
False
Correct
6. In Greenfoot, which of the following options are not possible when associatin
g an image file
with an instance?
Mark for Review
(1) Points
Add a video (*)
Draw an image
Import an image
Select an image from the Greenfoot library
Incorrect. Refer to Section 3 Lesson 2.
7. An instance variable can be saved and accessed later, even if the instance no
longer exists. True
or false?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 2.
8. A variable is also known as a ____________. Mark for Review
(1) Points
Instance
http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y
1 of 2 3/27/2015 5:53 AM
Class
Field (*)
Syntax
Method
Incorrect. Refer to Section 3 Lesson 2.
9. In Greenfoot, the body of the method is located in between which of the follo
wing characters? Mark for Review
(1) Points
Parnetheses ( )
Curly brackets { } (*)
Square brackets [ ]
Asterisks **
Correct
10. In Greenfoot, methods can be called in the act method. When the Act button i
s clickedin the
environment, the methods in the method body of the act method are executed. True
or false?
Mark for Review
(1) Points
True (*)
False
Which of the following is an incorrectly written programming statement? Mark fo
r Review
(1) Points
move(): (*)
move(2);
turn(25);
turn(2);

Incorrect. Refer to Section 3 Lesson 4.


2. Which of the following features of Greenfoot will teach you how to identify b
ugs in your
program?
Mark for Review
(1) Points
Code editor
Compilation (*)
Instance creation
Documentation
Correct
3. In object oriented programming, programmers analyze a problem and create obje
cts to solve
the problem. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
4. From your Greenfoot lessons, Which of the following statements is most correc
t? Mark for Review
(1) Points
My program is complete when it compiles.
My program is complete when I add music to it.
My program is complete when it runs and I've tested the code. (*)
My program is complete when I add images to it
Which of the following Greenfoot methods returns a random number between 0, up t
o and
including 10,000?
Mark for Review
(1) Points
Greenfoot.getRandomNumber(10,000)
Greenfoot.getRandomNumber(10,001) (*)
Greenfoot.getRandomNumber(9,999)
Greenfoot.getRandomNumber(0-10,000)
Correct
2. What does the following Greenfoot programming statement tell the class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); }
Mark for Review
(1) Points
If a random number is returned that is greater than 6, turn 18 degrees.
If a random number is returned that is less than 6, move 18 steps.
If a random number is returned that is less than 6, turn 18 degrees. (*)
Turn 6 degrees, then turn 18 degrees.
Incorrect. Refer to Section 3 Lesson 5.
3. Which of the following comparison operators represents "greater than or equal
"? Mark for Review
(1) Points
>
>= (*)
= =
! =
Correct
4. In Greenfoot you can use comparison operators to compare a variable to a rand
om number.
True or false?
Mark for Review
(1) Points
True (*)

False
Correct
5. An if-else statement executes its first code block if a condition is true, an
d its second code block
if a condition is false, but not both. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
6. The first step to executing an if-else statement is to:____________. Mark for
Review
(1) Points
Execute the if statement
Execute the else statement
Evaluate the class
Evaluate the condition (*)
Incorrect. Refer to Section 3 Lesson 5.
7. The list below displays characteristics of a Greenfoot world constructor, exc
ept for one. Which
one should be removed?
Mark for Review
(1) Points
Defines the instance's size and resolution.
Has a void return type. (*)
Has no return type.
Has the same name as the name of the class.
Executed automatically when a new instance of the class is created.
Incorrect. Refer to Section 3 Lesson 5.
http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y
1 of 2 3/27/2015 5:59 AM
8. In Greenfoot, which keyword calls the World superclass? Mark for Review
(1) Points
world
constructor
super (*)
addObject
new
Correct
9. In Greenfoot, which of the following is the correct notation for calling a me
thod foran instance
of a class?
Mark for Review
(1) Points
object-name.method-name(parameters); (*)
class-name.method-name(parameters);
Method-name.object-name(parameters);
Method-name.object-name;
Correct
10. In Greenfoot, a semicolon is not necessary at the end of a method that uses
dot notation. True
or false?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 5.
11. In Greenfoot, the origin of the world coordinate system (0,0) starts in the
center ofthe world.
True or false?

Mark for Review


(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 5.
12. Which keyword indicates that Greenfoot needs to create a new object? Mark f
or Review
(1) Points
new (*)
addObject
newObject
newClass
In the Greenfoot IDE, any new methods you create are written in the class's sour
ce code, below
the act method. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
2. In reference to Greenfoot, if the following method was defined in a superclas
s,
public void lookForEdge(){
...
}
all subclasses of the superclass will inherit the method.
True or false?
Mark for Review
(1) Points
True (*)
In Greenfoot, the sound file must be saved in the scenario and written in the so
urce code for it
to play. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
2. You cannot record unique sounds in Greenfoot. You can only use the sounds tha
t are stored in
the Greenfoot library. True or false?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 7.
3. What type of parameter does the keyDown method expect? Mark for Review
(1) Points
The password that will protect the class.
The name of the key to press on the keyboard. (*)
The name of the class that will use the key.
The name of the sound file to play when the key is pressed.
In Greenfoot, which method body correctly adds an instance of the World to a sce
nario, with
size x = 300 y = 300 and a resolution of 2 pixels per cell?
Mark for Review

(1) Points
world(300, 300, 2);
Super(300,300,2);
super(2,300,300);
super(300,300,2); (*)
Incorrect. Refer to Section 3 Lesson 8.
2. A constructor is executed once in the course of a Greenfoot scenario. True or
false? Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 8.
3. Which of the following Greenfoot programming statements creates a new instanc
e of Duke, and
places him at x = 140, y = 130 in the world?
Mark for Review
(1) Points
addObject(new( ), 140, 130);
addObject(new Duke( ), 140, 130); (*)
new(addObject(Duke ), 140, 130);
new(Duke( ) 140, 130);
Correct
4. Which keyword is used to add an actor to a Greenfoot world? Mark for Review
(1) Points
addObject
add
new (*)
super
Incorrect. Refer to Section 3 Lesson 8.
5. Which of the following is the correct syntax for declaring a variable in Gree
nfoot? Mark for Review
(1) Points
(Choose all correct answers)
public variable-type variable-name; (*)
private variable-name, variable-type;
public variable-name variable type;
private variable-type variable-name; (*)
Incorrect. Refer to Section 3 Lesson 8.
6. In Greenfoot, what is the purpose of the variable type? Mark for Review
(1) Points
Defines the access specifier used with the variable.
Defines what kind of data to store in the variable. (*)
Defines which class the variable is associated with.
Defines the instance that the variable is associated with.
Correct
7. Which operator is used to test if values are equal? Mark for Review
(1) Points
<
== (*)
>
http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y
1 of 2 3/27/2015 6:04 AM
!>
Incorrect. Refer to Section 3 Lesson 8.
8. In Greenfoot, the == operator is used to test if two values are equal. True o
r false? Mark for Review
(1) Points
True (*)
False
Correct

9. The GreenfootImage class enables Greenfoot actors to maintain their visible i


mage by holding
an object of type GreenfootImage. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
10. What does the following programming statement mean?
image1 = new GreenfootImage("duke12.png?);
Mark for Review
(1) Points
The variable, image1, cannot use the image file, duke12.png.
The image file, duke12.png, has just been drawn and imported into the scenario.
The image file, duke12.png, is assigned to the variable image1. (*)
Image files from 1-119 are associated with image1.
Incorrect. Refer to Section 3 Lesson 8.
11. In Greenfoot, which method is used to end a game? Mark for Review
(1) Points
Class.stop( );
Greenfoot.stop( ); (*)
Duke.stop( );
Game.stop(1);
Correct
12. Where can we review the available classes and methods in Greenfoot, includin
g the stop
method?
Mark for Review
(1) Points
Class menu
Object menu
Class Application Programmers' Interface (API)
Greenfoot Application Programmers' Interface (API) (*
From your Greenfoot lessons, which of the following are examples of when abstrac
tion
techniques are used?
Mark for Review
(1) Points
Assigning a sound file to an instance.
Assigning a keyboard key to an instance.
Assigning an image file to an instance.
All of the above. (*)
Incorrect. Refer to Section 3 Lesson 9.
2. Abstraction occurs in many different ways in programming. True or false? Mark
for Review
(1) Points
True (*)
False
From your Greenfoot lessons, which of the following are examples of actions that
can be
achieved using the while loop?
Mark for Review
(1) Points
Create 50 instances of the Duke class.
Call the move method 1 million times.
Call the move and turn methods 10 times.

Create 100 instances of an Actor subclass.


All of the above. (*)
Incorrect. Refer to Section 3 Lesson 10.
2. Which of the following is not a component of a while loop? Mark for Review
(1) Points
Local variable
Control operator
Loop variable
if statement (*)
while keyword
Incorrect. Refer to Section 3 Lesson 10.
3. If an end to a while loop is not established, what happens? Mark for Review
(1) Points
The code stops after 10 executions.
The code stops after 20 executions.
The condition becomes false after one minute of executions.
The code executes and does not stop. (*)
Incorrect. Refer to Section 3 Lesson 10.
4. Infinite loops are a common cause of errors in programming. True or false? Ma
rk for Review
(1) Points
True (*)
False
Correct
5. An array is an object that holds multiple methods. True or false? Mark for Re
view
(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 10.
6. In Greenfoot, arrays are a way to hold and access multiple variables, and ass
ign different values
to new instances each time the while loop executes and produces a new instance.
True or false?
Mark for Review
(1) Points
True (*)
False
Correct
7. Which of the following Greenfoot logic operators represents "not"? Mark for
Review
(1) Points
&
&&
=
! (*)
Correct
http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y
1 of 2 3/27/2015 6:07 AM
8. In the Greenfoot IDE, what does the AND operator (&&) do? Mark for Review
(1) Points
Compares two boolean values, and returns a boolean value which is true if and on
ly ifboth
of its operands are true. (*)
Compares two boolean values, and returns a boolean value which is true if and on
ly ifone
of its operands are true.
Compares two boolean values and returns a boolean value which is true if either
one of the
operands is true.

Compares two boolean variables or expressions and returns a result that is true
if either of
its operands are true.
Correct
9. In Greenfoot, a local variable is declared at the beginning of a class. True
or false? Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 3 Lesson 10.
10. In Greenfoot, what types of values cannot be stored in a local variable? Mar
k for Review
(1) Points
Class name
Objects
Integers
World name
Method (*)
Incorrect. Refer to Section 3 Lesson 10.
11. In Greenfoot, string concatenation reduces the number of redundant character
s or phrases you
need to type into each array. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
12. Which of the following is an example of string concatenation? Mark for Revi
ew
(1) Points
Instead of entering ".png" after each image file name, add && ".png" after the i
mageName
value in the programming statement.
Instead of entering ".png" after each image file name, add = ".png" after the im
ageName
value in the programming statement.
Instead of entering ".png" after each image file name, add + ".png" after the im
ageName
value in the programming statement. (*)
Instead of entering ".png" after each image file name, add ".png" after the imag
eName
value in the programming statement.
From your Greenfoot lessons, the __________ control structure is used to compare
and make a decision. Mark for Review
(1) Points
Conditional (*)
Repetition
Obsolete
Rewind
Incorrect. Refer to Section 3 Lesson 12.
2. From your Greenfoot lessons, the __________ control structure is often referr
ed to asloops. Mark for Review
(1) Points
Conditional
Repetition (*)
Obsolete
Rewind
Incorrect. Refer to Section 3 Lesson 12.

3. The construct listed below is described as a __________________.


/**
* Get value and store in variable
*/
Mark for Review
(1) Points
Method
Comment (*)
Variable Assignment
Instruction
Correct
4. The construct listed below is described as a __________________.
termvar = scanterm.nextLine();
Mark for Review
(1) Points
Method
Comment
Variable Assignment (*)
Instruction
Correct
5. What is wrong with the following line of code?
System.out.println(termvar + '; '+ termdef );
Mark for Review
(1) Points
There are parenthesis instead of brackets.
There are parenthesis instead of curly braces.
There are single quotes instead of double quotes. (*)
The command is incorrectly capitalized.
Nothing is wrong with the code.
Incorrect. Refer to Section 3 Lesson 12.
6. Which line of code contains a syntax error? Mark for Review
(1) Points
2
3 (*)
4
5
6
Incorrect. Refer to Section 3 Lesson 12.
7. In which step to create a Greenfoot game do you find and resolve errors in th
e game? Mark for Review
(1) Points
Define the problem
Design the solution
Program the solution
Test the solution (*)
Incorrect. Refer to Section 3 Lesson 12.
8. In which step to create a Greenfoot game is the solution implemented? Mark fo
r Review
(1) Points
Define the problem
Design the solution
Program the solution (*)
Test the solution
Incorrect. Refer to Section 3 Lesson 12.
9. From your Greenfoot lessons, which of the following are examples of Q/A test
variations? Mark for Review
(1) Points
Change the environment, change the programmer, change the execution
Change the execution, change the data, change the environment (*)

Change the environment, change the execution, change the language


All of the above.
Correct
10.The variations listed below are examples of changing what part of Q/A testing
?
Input numbers when characters are expected
Input characters when numbers are expected
Input symbols
Mark for Review
(1) Points
Change the environment
Change the execution
Change the data (*)
None of the above
In Alice, which of the following is the most likely situation where procedural a
bstraction could
be used?
Mark for Review
(1) Points
Five dogs all need to bark and run at the same time. (*)
One fish needs to swim forward 1 meter.
Two fish say something to each other.
One person moves up 10 meters.
Incorrect. Refer to Section 2 Lesson 5.
2. From your Alice lessons, where on an object do an object's axes intersect? Ma
rk for Review
(1) Points
At the object's chest
At the object's head
At the object's center point (*)
At the object's bottom
Correct
3. From your Alice lessons, which control statement executes instructions simult
aneously? Mark for Review
(1) Points
Do in order
Count
Variable
Do together (*)
Incorrect. Refer to Section 2 Lesson 4.
4. In Alice, which of the following programming statements moves the cat backwar
d, 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
5. 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 (*)
Incorrect. Refer to Section 2 Lesson 6.

Define the value of the variable LapCount based on the following math calculatio
n: LapCount + 10
= 15
Mark for Review
(1) Points
2
4
5 (*)
15
10
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. The say procedure in Alice plays an audio file. True or false? Mark for Revie
w
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 3.
9. What do lines 7, 10 and 13 do in the following code? Mark for Review
(1) Points
Export files called A, B, and num3.
Create a single file containing A, B, and the value of num3.
Print "A", "B" and the value of num3 on the screen. (*)
None of the above.
Incorrect. Refer to Section 2 Lesson 14.
10.Which of the following are examples of elements you would test in your Alice
animation? Mark for Review
(1) Points
(Choose all correct answers)
All of the procedures display in alphabetical order in the Procedures tab.
Math expressions calculate as expected. (*)
Objects move with smooth timing. (*)
Use your Greenfoot knowldege: Abstraction occurs in many different ways in progr
amming. True or false? Mark for Review
(1) Points
True (*)
False
Correct
27.From your Greenfoot lessons, where do you review a class's inherited methods?
Mark for Review
(1) Points
Act method
Documentation (*)
Inspector
If-statement
Incorrect. Refer to Section 3 Lesson 3.
Section 4
(Answer all questions in this section)
28.Which of the following defines a driver class? Mark for Review
(1) Points
Contains a main method and other static methods. (*)
Contains classes that define objects.

Contains a main method, a package, static methods, and classes that define objec
ts.
None of the above.
Incorrect. Refer to Section 4 Lesson 2.
29.Examine the following code:
What is the value of variable x?
Mark for Review
(1) Points
2 (*)
2.5
6
14
Correct
30.When converting gallons to liters its best to put the calculation result into
a variable with a _______________
data type.
Mark for Review
(1) Points
int
double (*)
boolean
None of the above
Incorrect. Refer to Section 4 Lesson 1
Four variables are required to support a conversion of one unit of measure to an
other unit of
measure. True or False?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 4 Lesson 1.
32. Given the code
String s1 = "abcdef";
String s2 = "abcdef";
String s3 = new String(s1);
Which of the following would equate to false?
Mark for Review
(1) Points
s1 == s2
s1 = s2
s3 == s1 (*)
s1.equals(s2)
s3.equals(s1)
Incorrect. Refer to Section 4 Lesson 4.
33. The following code is an example of creating a String reference:
String s;
True or false?
Mark for Review
(1) Points
True (*)
False
Incorrect. Refer to Section 4 Lesson 4.
Section 5
(Answer all questions in this section)
34. Which of the following correctly matches the switch statement keyword to its
function? Mark for Review
(1) Points
(Choose all correct answers)
switch: tells the compiler the value to compare the input against

default: signals what code to execute if the input does not match any of the cas
es (*)
case: signals what code is executed if the user input matches the specified elem
ent (*)
if: records the user's input and sends it to the case statements to find a possi
ble match
switch: identifies what element will be compared to the element of the case stat
ements to
find a possible match (*)
Incorrect. Refer to Section 5 Lesson 1.
35. Why are loops useful? Mark for Review
(1) Points
They save programmers from having to rewrite code.
They allow for repeating code a variable number of times.
They allow for repeating code until a certain argument is met.
All of the above. (*)
What is the output of the following segment of code?
int array[][] = {{1,2,3},{3,2,1}};
for(int i=0;i<2;i++)
for(int j=0;j<3;j++)
System.out.print(2*array[1][1]);
Mark for Review
(1) Points
444444 (*)
123321
246642
222222
This code doesn't compile.
Incorrect. Refer to Section 6 Lesson 1.
37. Which of the following declares and initializes a one dimensional array that
can hold 5 Object
reference types?
Mark for Review
(1) Points
String[] array=new String[5];
Object array=new Object[5]; (*)
Object[] array=new Object[4];
String[] array=String[4];
Incorrect. Refer to Section 6 Lesson 1.
38. Selection sort is a sorting algorithm that involves finding the minimum valu
e in the list,
swapping it with the value in the first position, and repeating these steps for
the remainder of
the list. True or false?
Mark for Review
(1) Points
True (*)
False
Correct
39. Bubble Sort is a sorting algorithm that involves swapping the smallest value
into the first index,
finding the next smallest value and swapping it into the next index and so on un
til the array is
sorted. True or false?
Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 6 Lesson 2.

40. What are exceptions used for in Java? Mark for Review
(1) Points
Correcting mistakes made in your code and handling extraordinary cases. (*)
Exceptions have no use, they are just a part of the Java language.
Helping the interpreter compile code quicker and handle user interfaces.
Making the program easier to use for the user and reducing the possibilities of
errors
occuring
What operator do you use to call an object's constructor method and create a new
object? Mark for Review
(1) Points
+
new (*)
instanceOf
Correct
42. Which of the following creates a class named Student with one constructor, a
nd 2 instance
variables, name and gpa?
Mark for Review
(1) Points
public class Student { private String name; private float gpa; }
public class Student private String name; private float gpa; Student();
public class Student { private String name; private float gpa; Student(){ name="
Jane Doe";
gpa=3.0;} } (*)
public class Student { private String name; Student{ name="Jane Doe"; float gpa=
3.0; }
Incorrect. Refer to Section 7 Lesson 1.
43. What is the output of the following code segment:
int n = 13;
System.out.print(doNothing(n));
System.out.print(" ", n);
where the code from the method doNothing is:
public double doNothing(int n)
{
n = n + 8;
return (double) 12/n;
}
Mark for Review
(1) Points
1.75, 13
0.571, 21
1.75, 21
0.571, 13 (*)
Incorrect. Refer to Section 7 Lesson 1.
44. Static classes are designed as thread safe class instances. True or false? M
ark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 7 Lesson 3.
45. Where should the constructor for a superclass be called? Mark for Review
(1) Points
Anywhere inside the subclass.
Inside the main method of the subclass.
The last line in the constructor of the subclass.
The first line of the constructor in the subclass. (*)
The super constructor does not need to be called inside the subclass.

Why are hierarchies useful for inheritance? Mark for Review


(1) Points
They keep track of where you are in your program.
They restrict a superclass to only have one subclass.
They organize constructors and methods in a simplified fashion.
They are used to organize the relationship between a superclass and its subclass
es. (*)
Correct
47. Which of the following would be most beneficial for this scenario?
Joe is a college student who has a tendency to lose his books. Replacing them is
getting costly.
In an attempt to get organized, Joe wants to create a program that will store hi
s textbooks in
one group of books, but he wants to make each book type the subject of the book
(i.e.
MathBook is a book). How could he store these different subject books into a sin
gle array?
Mark for Review
(1) Points
By ignoring the subject type and initializing all the book as objects of type Bo
ok.
By overriding the methods of Book.
Using polymorphism. (*)
This is not possible. Joe must find another way to collect the books.
Correct
48. Identify the correct way to declare an abstract class. Mark for Review
(1) Points
abstract public class ClassName{...}
public abstract ClassName(...)
public class abstract ClassName(...)
public abstract class ClassName{...} (*)
Incorrect. Refer to Section 7 Lesson 5.
49. It is possible to return an object from a method. True or false? Mark for Re
view
(1) Points
True (*)
False
Incorrect. Refer to Section 7 Lesson 2.
50. Which of the following is the correct way to code a method with a return typ
e an object
Automobile?
Mark for Review
(1) Points
Automobile upgrade(String carA){
carA="Turbo";
return carA;}
Automobile upgrade(Automobile carA){
carA.setTurbo("yes");
return carA;} (*)
String upgrade(String carA){
carA="Turbo";
return carA;}
upgrade(Automobile carA) Automobile{
carA.setTurbo("yes");
return carA;}
None of the above. It is not possible to return an object.

Which of the following can be used as a parameter?


(1) Points

Mark for Review

(Choose all correct answers)


Integers (*)
Strings (*)
Constructors
Arrays (*)
Objects (*)

[Correct]

Correct

47.
The following code is a good example of using the this r
eference. True or false?
Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

48.
The basic unit of encapsulation in Java is the primitive
data type. True or false?
Mark for Review
(1) Points
True
False (*)

[Incorrect]

Incorrect. Refer to Section 7 Lesson 1.

49.

A class can only have one constructor. True or false?

Mark for Review


(1) Points
True
False (*)

[Correct]

Correct

50.
Static methods can return any object type. True or false
?
Mark for Review
(1) Points
True (*)
False
If an abstract class does not have implemented constructors or methods,
it should be implemented as an interface instead. True or false?
Mark for
Review
(1) Points
True (*)
False

[Incorrect]

Incorrect. Refer to Section 7 Lesson 5.


42.

What is Polymorphism?

Mark for Review

(1) Points
A way of redefining methods with the same return type and parameters.
A way to create multiple methods with the same name but different parame
ters.
A class that cannot be initiated.
The concept that a variable or reference can hold multiple types of obje
cts. (*)

[Incorrect]

Incorrect. Refer to Section 7 Lesson 5.

43.
Which of the following is the correct way to call an ove
rriden method needOil() of a super class Robot in a subclass SqueakyRobot?
Mark for Review
(1) Points
Robot.needOil(SqueakyRobot);
SqueakyRobot.needOil();
super.needOil(); (*)
needOil(Robot);

[Correct]

Correct

44.
According to the following class declaration, runSpeed c
an be modified in class Cat. True or false?
public class Tiger extends Cat{
public int runSpeed;
}
Mark for Review
(1) Points
True
False (*)

[Incorrect]

Incorrect. Refer to Section 7 Lesson 4.

45.
uctor. True or False?
(1) Points

It is possible to overload a method that is not a constr


Mark for Review

True (*)
False
Which of the following statements add all of the elements of the one dimensional
array prices, and then prints the sum to the screen? Mark for Review
(1) Points
int total = 0;
for(int i = 0; i total+=prices[i];

int total = 0;
for(int i = 0; i total+=prices[i];
System.out.println(total); (*)
int total = 0;
for(int i = 1; i total = total+prices[i];
System.out.println(prices);
int total = 0;
for(int i = 0; i total+=prices[i];
System.out.println(prices);

[Incorrect]

Incorrect. Refer to Section 6 Lesson 1.

37.
What will be the content of the array variable table aft
er executing the following code?
Mark for Review
(1) Points
1 1 1
0 1 1
0 0 1
1 0 0
0 1 0
0 0 1
1 0 0
1 1 0
1 1 1 (*)
0 0 1
0 1 0
1 0 0

[Incorrect]

Incorrect. Refer to Section 6 Lesson 1.


38.

Mark for Review


(1) Points
n

Of the options below, what is the fastest run-time?

n^2
lg(n) (*)
n*lg(n)

[Correct]

Correct
39.

Why might a sequential search be inefficient?

Mark for

Review
(1) Points
It utilizes the "divide and conquer" method, which makes the algorithm m
ore error prone.
It requires incrementing through the entire array in the worst case, whi
ch is inefficient on large data sets. (*)
It involves looping through the array multiple times before finding the
value, which is inefficient on large data sets.
It is never inefficient.

[Incorrect]

eption?
(1) Points

Incorrect. Refer to Section 6 Lesson 2.


40.
Which of the following could be a reason to throw an exc
Mark for Review

To eliminate exceptions from disrupting your program. (*)


You have a fatal error in your program.
You have encountered a Stack Overflow Error.
To make the user interface harder to navigate.

[Correct]
Correct
Which of the following defines an object class?
(1) Points

Mark for Review

Contains a main method and other static methods.


Contains classes that define objects. (*)
Contains a main method, a package, static methods, and classes that defi
ne objects.
None of the above.

[Incorrect]

Incorrect. Refer to Section 4 Lesson 2.

32.
When converting gallons to liters its best to put the ca
lculation result into a variable with a _______________ data type.
Mark for
Review
(1) Points
int
double (*)
boolean
None of the above

[Correct]

Correct

33.
A _______________ is used to organize Java related files
.
Mark for Review
(1) Points
Project
Workspace
Package (*)
Collection

[Correct]

Correct

Section 5
(Answer all questions in this section)
34.
In an if-else construct the condition to be evaluated mu
st end with a semi-colon. True or false?
Mark for Review
(1) Points
True
False (*)

[Incorrect]

Incorrect. Refer to Section 5 Lesson 1.


35.

What is the output of the following code segment?

int num = 7;
while(num >= 0)
{
num -= 3;
}
System.out.println(num);
(1) Points

Mark for Review

-2 (*)
1
0
2
In Greenfoot, the image below is an example of what construct?
Mark for Review
(1) Points
Method
Conditional (*)
Variable Assignment
Class

[Correct]

Correct

27.
Use your Greenfoot knowledge to answer the question: Whe
re 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. (*)

[Correct]

Correct

Section 4
(Answer all questions in this section)
28.
What will the following code segment output? String s="\
\\\\\\\"; System.out.println(s);
Mark for Review
(1) Points
"\\\\\"
\\\\\\\\
\\
\\\\ (*)

[Correct]

Correct
29.

Mark for Review


(1) Points
True

The following code prints 5 "a"'s to the screen:

False (*)

[Incorrect]

Incorrect. Refer to Section 4 Lesson 4.


30.

Which of the following statements displays 12345?

I. System.out.println( 123 * 100 + 45);


II. System.out.println("123" + 45);
III. System.out.println( 12 + "345"); Mark for Review
(1) Points
All of the above. (*)
I only.
I and II only.
II and III only.
None of the above.

In Greenfoot, a subclass is created by right-clicking on a superclass. T


rue or false? Mark for Review
(1) Points
True (*)
False

[Correct]

Correct

22.
emory. True or false?
(1) Points

From your Greenfoot lessons, instances do not have any m


Mark for Review

True
False (*)

[Correct]

Correct

23.
From your Greenfoot lessons, when a method needs additio
nal data to perform a task, this data comes from parameters. True or false?
Mark for Review
(1) Points
True (*)
False

[Correct]

called from?
(1) Points

Correct
24.
To execute a method in your Greenfoot game, where is it
Mark for Review

The world
The act method (*)
The actor class
The gallery

[Correct]

Correct

25.
rd has been pressed?
(1) Points

In Greenfoot, which method checks if a key on the keyboa


Mark for Review

keyPress method
keyUp method
keyDown method (*)
keyClick method
In Greenfoot, only 10 methods can be written for each class in the Code
editor. True or false? Mark for Review
(1) Points

True
False (*)

[Correct]

Correct

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

[Incorrect]

Incorrect. Refer to Section 3 Lesson 4.

18.
Use you Greenfoot knowledge: What range of numbers does
the following method return?
Greenfoot.getRandomNumber(30)
(1) Points

Mark for Review

A random number between 1 and 30.


A random number between 0 and 30.
A random number between 0 and 29. (*)
A random number between 1 and 29.

[Correct]

Correct

19.
From your Greenfoot lessons, which of the following is n
ot 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

[Incorrect]

Incorrect. Refer to Section 3 Lesson 5.

20.
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 (*)
11.
A conditional loop is a loop that will continue forever. True or false?
Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

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

[Incorrect]

Incorrect. Refer to Section 2 Lesson 6.


13.

Which 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?
A(*)
From your Greenfoot lessons, which of the following logic operators repr
esents "and"? Mark for Review
(1) Points
&
&& (*)
=
!

[Correct]

variable?
(1) Points

Correct
15.
In Greenfoot, what is a common letter used for the loop
Mark for Review

A
I (*)
X
Y

[Correct]

Correct

An Alice event is considered what?


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

Mark for Review

[Incorrect]

Incorrect. Refer to Section 2 Lesson 11.

7.
In Alice, which of the following programming 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]

Correct

8.
If you want one message to display if a user is below th
e 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 (*)

[Correct]

Correct

9.
In Alice, when a new procedure is declared, all subclass
es of the superclass will inherit the procedure. True or false?
Mark for
Review
(1) Points
True (*)
False

[Correct]

Correct

10.
The comments you enter in Alice should describe the sequ
ence of actions that take place in the code segment. True or false?
Mark for
Review
(1) Points
True (*)
False
Examine the following code. What are the variables?
args
n (*)
i (*)
t
In Alice, functions are dragged into the control statement, not the proc
edure. True or false? Mark for Review
(1) Points
True
False (*)

[Correct]

Correct

3.
Which of the following are examples of elements you woul
d test in your Alice animation?
Mark for Review
(1) Points
(Choose all correct answers)
All of the procedures display in alphabetical order in the Procedures ta
b.
Math expressions calculate as expected. (*)
Objects move with smooth timing. (*)
Event listeners trigger the correct responses. (*)

[Incorrect]

Incorrect. Refer to Section 2 Lesson 12.

4.
From your Alice lessons, what is a one-shot procedural m
ethod? 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]

Correct

5.
From your Alice lessons, what is the purpose of nesting?
Mark for Review
(1) Points
To add more procedures to your program.
To add visual structure to your program. (*)
To add text to your program that tells the viewer what the code does.
To add random movements to your program.