Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
In Alice, functions are dragged into the control statement, not the
procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
[Correct] Correct
Visual storyboard
Flowchart (*)
Pie chart
Scene editor
Class chart
[Correct] Correct
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
[Correct] Correct
[Correct] Correct
(*)
[Correct] Correct
Color
Decimal Number
Whole Number
Function (*)
[Correct] Correct
11. From your Alice lessons, variables are fixed and cannot be changed. True or
false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
12. From your Alice lessons, what is the purpose of nesting? Mark
for Review
(1) Points
To add text to your program that tells the viewer what the code does.
Scene Activation/Time
Cursor (*)
Keyboard
Mouse
Position/Orientation
[Correct] Correct
[Correct] Correct
True (*)
False
[Correct] Correct
16. 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 (*)
[Correct] Correct
True (*)
False
[Correct] Correct
Print "A", "B" and the value of num3 on the screen. (*)
[Correct] Correct
True (*)
False
[Correct] Correct
20. 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.
[Correct] Correct
21. 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
[Correct] Correct
22. From your Alice lessons, if you examined a science process that
had many steps, which of the following is a way that you could apply functional
decomposition to this process? Mark for Review
(1) Points
[Correct] Correct
Section 3
(Answer all questions in this section)
[Correct] Correct
True (*)
False
25. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points
[Correct] Correct
26. From your Greenfoot lessons, which of the following logic operators
represents "and"? Mark for Review
(1) Points
&
&& (*)
[Correct] Correct
27. 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] Correct
28. When designing a game in Greenfoot, it helps to define the
actions that will take place in a textual storyboard. True or false? Mark for
Review
(1) Points
True (*)
False
[Correct] Correct
[Correct] Correct
True
False (*)
[Correct] Correct
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
[Correct] Correct
True
False (*)
[Correct] Correct
Actor
Greenfoot (*)
GreenfootImage
World
[Correct] Correct
Spacing missing
Comma missing
[Correct] Correct
36. In Greenfoot, dot notation is used to call a _____________ from another
class. Mark for Review
(1) Points
Method (*)
Class
Signature
Parameter
[Correct] Correct
[Correct] Correct
38. From your Greenfoot lessons, instances do not have any memory.
True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
Methods
Classes
Integers (*)
Scenarios
[Correct] Correct
True
False (*)
[Correct] Correct
41. In Greenfoot, the properties of an instance can be modified in the
documentation. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
42. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points
Galleries
Classes (*)
Scenarios
Objects (*)
[Correct] Correct
True (*)
False
[Correct] Correct
44. 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] Correct
Is a method
Their methods
[Correct] Correct
47. Which Greenfoot control operator is used to test if two values
are equal? Mark for Review
(1) Points
>= operator
== operator (*)
= operator
!= operator
[Correct] Correct
True (*)
False
[Correct] Correct
The world
The gallery
[Correct] Correct
50. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
[Correct] Correct
Define the value of the variable LapCount based on the following math calculation:
LapCount + 10 = 15 Mark for Review
(1) Points
5 (*)
15
10
[Correct] Correct
True
False (*)
[Correct] Correct
3. From your Alice lessons, the "Checklist for Animation Completion"
does not ask questions about the scenario and storyboards, because these are not
valid parts of the animation creation process. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
Code
Project
Class (*)
Program
[Correct] Correct
6. In Alice, which of the following is the most likely situation where
procedural abstraction 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.
[Correct] Correct
[Correct] Correct
[Correct] Correct
9. In Alice, we can avoid object collision using what? Mark for
Review
(1) Points
[Correct] Correct
An object's orientation.
Error handling.
[Correct] Correct
11. Which of the following actions would require a control statement to control
animation timing? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
[Correct] Correct
False
[Correct] Correct
16. 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.
[Correct] Correct
17. From your Alice lessons, the IF control structure can process one
true and one false response. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
19. What do lines 9 and 11 do in the following code?
Accept user input and store them in the variables num1 and num2. (*)
21. All objects in Alice have three dimensional coordinates on which axes?
Mark for Review
(1) Points
x (*)
y (*)
z (*)
w
[Correct] Correct
22. In Alice, you can define your own procedures for a class, but not
your own functions. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
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] Correct
24. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
25. In Greenfoot, objects are created from: Mark for Review
(1) Points
Methods
Classes (*)
Signatures
Parameters
[Correct] Correct
26. 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
[Correct] Correct
Method (*)
Class
Signature
Parameter
[Correct] Correct
True (*)
False
[Correct] Correct
29. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
31. In Greenfoot, constructors can be used to create new instances of objects.
True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
32. Using Greenfoot, how do we change the size and resolution of the
World instance? Mark for Review
(1) Points
[Correct] Correct
keyPress method
keyUp method
keyClick method
[Correct] Correct
34. From your Greenfoot lessons, instances do not have any memory.
True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
36. From your Greenfoot lessons, when a method needs additional data to perform a
task, this data comes from parameters. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Methods
Classes
Integers (*)
Scenarios
[Correct] Correct
38. 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] Correct
39. 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] Correct
World getClass()
World getWorld()
getXY()
[Correct] Correct
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
I = 100 + i
i=1
i = i
i = i + 1 (*)
[Correct] Correct
False (*)
[Correct] Correct
String concatenation
Integers
[Correct] Correct
46. In a Greenfoot loop constructor, which component is a counter that controls
how many times the statement is executed? Mark for Review
(1) Points
Local loop
While loop
Condition
[Correct] Correct
True (*)
False
[Correct] Correct
x (*)
y (*)
[Correct] Correct
> (*)
<
= =
! =
[Correct] Correct
If a condition is true.
[Correct] Correct
Together
Do together (*)
Do in order
While
[Correct] Correct
roll Left 1
True (*)
False
True
False (*)
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 (*)
Distance (*)
Object name
Duration (*)
Direction
Procedure name
1. The list below contains method descriptions. All are correct except which
one? Mark for Review
(1) Points
[Correct] Correct
An instance
A method (*)
A class
A variable
[Correct] Correct
3. You have a Class representing Cat. A 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
[Correct] Correct
while loop
if (*)
array
boolean
[Correct] Correct
do loop
while loop
if (*)
repeat...until
if
[Correct] Correct
Select the result from the following statements about what happens when the loopVal
>= 5 . Mark for Review
(1) Points
The message "Printing Some Text" will be printed until loopVal is no longer
less than 5.
The condition loopVal < 5 is tested before executing anything further in the
program. (*)
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] Correct
True
False (*)
[Correct] Correct
Print "A", "B" and the value of num3 on the screen. (*)
11. Consider the following: You want to use the BufferedReader and
InputStreamReader classes to get user input from the command line. Which one of the
following import statements must you use? Mark for Review
(1) Points
import java.awt.*;
import java.buffer.*;
import java.io.input.*;
[Correct] Correct
1. The list below describes variables. All are correct except which one? Mark
for Review
(1) Points
A place in memory where data of a specific type can be stored for later
retrieval and use.
[Correct] Correct
args
n
i
[Correct] Correct
Types (*)
Expressions
Variables
Specifications
[Correct] Correct
boolean
String (*)
long
int
double
[Correct] Correct
% (*)
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
8. What is the result of the following code?
x > y : x > y
x < y : x < y
x > y : 1
x < y : 0
x > y : 0
x < y : 1
x > y : true
x < y : false (*)
x > y : false
x < y : true
True (*)
False
[Correct] Correct
j is 5
k is 5 (*)
j is 10
j is 5
k is 5
j is 10
k is 10
j is 15
k is 15
[Correct] Correct
A person to help.
A system to start.
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
Visual storyboard
Textual storyboard
Flowchart (*)
World
Pie chart
[Correct] Correct
True
False (*)
[Correct] Correct
7. From your Alice lessons, what does inheritance mean? Mark for
Review
(1) Points
Each class inherits the methods and properties of all classes available in
Alice.
Each subclass inherits the methods and properties of its superclass. (*)
Each class has its own methods and properties that are non-transferable to
any other class.
[Correct] Correct
Fins
Two eyes
Procedures
Functions
[Correct] Correct
False
[Correct] Correct
11. In Alice, new procedures are declared in the Scene editor. True
or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
An object does not have a default procedure for a motion, such as swimming.
(*)
[Correct] Correct
14. In Alice, if only objects that walk on four legs need to use a
procedure, in which superclass would the procedure be declared? Mark for Review
(1) Points
Quadruped (*)
Biped
Swimmer
Prop
[Correct] Correct
1. As the Alice programmer, you render the animation on your own. True or false?
Mark for Review
(1) Points
True
False (*)
A person to help.
A system to start.
The Internet
A close friend
Other programmers
[Correct] Correct
True (*)
False
True (*)
False
[Correct] Correct
addDefaultManipulation procedure
addMouseListener procedure
addListener procedure
Object class
myFirstMethod class
Quadruped class
[Correct] Correct
True (*)
False
True
False (*)
Section 1
(Answer all questions in this section)
Together
Do together (*)
Do in order
While
Correct Correct
roll Left 1
Correct Correct
False
Correct Correct
True
False (*)
Correct 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 (*)
Distance (*)
Object name
Duration (*)
Direction
Procedure name
Section 1
(Answer all questions in this section)
A person to help.
A system to start.
Correct Correct
True
False (*)
Correct Correct
True (*)
False
Correct Correct
True (*)
False
Correct Correct
Visual storyboard
Textual storyboard
Flowchart (*)
World
Pie chart
Correct Correct
True
False (*)
Correct Correct
7. From your Alice lessons, what does inheritance mean? Mark for
Review
(1) Points
Each class inherits the methods and properties of all classes available in
Alice.
Each subclass inherits the methods and properties of its superclass. (*)
Each class has its own methods and properties that are non-transferable to
any other class.
Fins
Two eyes
Procedures
Functions
True (*)
False
Correct Correct
11. In Alice, new procedures are declared in the Scene editor. True
or false? Mark for Review
(1) Points
True
False (*)
True (*)
False
Correct Correct
13. In Alice, which of the following situations could benefit from
declaring a new procedure? Mark for Review
(1) Points
An object does not have a default procedure for a motion, such as swimming.
(*)
14. In Alice, if only objects that walk on four legs need to use a
procedure, in which superclass would the procedure be declared? Mark for Review
(1) Points
Quadruped (*)
Biped
Swimmer
Prop
Correct Correct
Section 1
(Answer all questions in this section)
While
Count
Move (*)
Correct Correct
Do Together (*)
Do In Order
While
Count
Variable
True
False (*)
Correct Correct
False (*)
Correct Correct
A class of another
An object of another
An instance of another
Correct Correct
setClassVehicle
setObjectVehicle
setVehicle (*)
Vehicle
Section 1
(Answer all questions in this section)
1. 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 Correct
True
False (*)
True
False (*)
Correct Correct
True (*)
False
3x3=9 (*)
2. Alice uses built-in math operators. They are: Mark for Review
(1) Points
Add
Subtract
Multiply
Divide
Correct Correct
Correct Correct
4. In Alice, which of the following programming statements moves the
cat forward the distance to the bird? Mark for Review
(1) Points
Correct Correct
Hello World
An object
Correct Correct
"Greetings" (*)
"Howdy" (*)
"4" (*)
Section 1
(Answer all questions in this section)
1. 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 Correct
True
False (*)
Correct Correct
Section 1
(Answer all questions in this section)
True
False (*)
Correct Correct
A person to help.
A system to start.
Correct Correct
The Internet
A close friend
Other programmers
Correct Correct
True (*)
False
Correct Correct
Correct Correct
True (*)
False
Correct Correct
addDefaultManipulation procedure
addMouseListener procedure
addListener procedure
Correct Correct
8. In which Alice class is the addDefaultModelManipulation procedure
located? Mark for Review
(1) Points
Object class
myFirstMethod class
Quadruped class
True (*)
False
Correct Correct
True
False (*)
Correct Correct
Section 1
(Answer all questions in this section)
1. The list below describes variables. All are correct except which
one? Mark for Review
(1) Points
A place in memory where data of a specific type can be stored for later
retrieval and use.
args
Correct Correct
Types (*)
Expressions
Variables
Specifications
Correct Correct
boolean
String (*)
long
int
double
% (*)
Correct Correct
6. Results of arithmetic operations cannot be stored in a variable.
True or false? Mark for Review
(1) Points
True
False (*)
Correct Correct
True (*)
False
Correct Correct
x > y : x > y
x < y : x < y
x > y : 1
x < y : 0
x > y : 0
x < y : 1
x > y : true
x < y : false (*)
x > y : false
x < y : true
Correct Correct
True (*)
False
Correct Correct
j is 5
k is 5 (*)
j is 10
j is 5
k is 5
j is 10
k is 10
j is 15
k is 15
Section 1
(Answer all questions in this section)
An instance
A method (*)
A class
A variable
Correct Correct
3. You have a Class representing Cat. A 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
if (*)
array
boolean
Correct Correct
do loop
while loop
if (*)
repeat...until
if
Incorrect Incorrect. Refer to Section 2 Lesson 14.
Select the result from the following statements about what happens when the loopVal
>= 5 . Mark for Review
(1) Points
The message "Printing Some Text" will be printed until loopVal is no longer
less than 5.
The condition loopVal < 5 is tested before executing anything further in the
program. (*)
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.
False (*)
Correct Correct
Print "A", "B" and the value of num3 on the screen. (*)
Correct Correct
11. Consider the following: You want to use the BufferedReader and
InputStreamReader classes to get user input from the command line. Which one of the
following import statements must you use? Mark for Review
(1) Points
import java.awt.*;
import java.buffer.*;
import java.io.input.*;
Correct Correct
Section 1
(Answer all questions in this section)
They both allow you to learn the fundamental ideas in programming by creating
objects in a virtual world. (*)
[Correct] Correct
1 only
2 only
3 only
1, 2, and 3
Implement
Create a scenario
Design a storyboard
Shared responsibility
Clear roles
Regular participation
A single leader (*)
1 only
1 and 2 only
1, 2, and 3 only
1, 2, 3, and 4 (*)
Rarely listens to, shares with, and supports the efforts of others. Often is
not a good team player.
Almost always listens to, shares with, and supports the efforts of others.
Tries to keep people working well together and mentors team members when
appropriate. (*)
Usually listens to, shares, with, and supports the efforts of others. Does
not cause "waves" in the group.
Often listens to, shares with, and supports the efforts of others, but not
always.
Is often publicly critical of the project or the work of other members of the
group. Is often negative about the task(s). (*)
Is rarely publicly critical of the project or the work of others. Often has a
positive attitude about the task(s).
Is never publicly critical of the project or the work of others. Always has a
positive attitude about the task(s).
1 only
2 only
2 and 3 only
1, 2, and 3 (*)
Neither 1 nor 2
[Correct] Correct
Follow your organization's cybersecurity rules and report issues when they
happen.
[Correct] Correct
Copying and pasting parts of someone else?s work into your own without giving
them credit.
Posting information about people at school that they would never want shared.
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
They both allow you to learn the fundamental ideas in programming by creating
objects in a virtual world. (*)
[Correct] Correct
2 only
3 only
1, 2, and 3
Test
Implement
Create a scenario
Design a storyboard
[Correct] Correct
Shared responsibility
Clear roles
Regular participation
1 only
1 and 2 only
1, 2, and 3 only
1, 2, 3, and 4 (*)
[Correct] Correct
Almost always listens to, shares with, and supports the efforts of others.
Tries to keep people working well together and mentors team members when
appropriate. (*)
Usually listens to, shares, with, and supports the efforts of others. Does
not cause "waves" in the group.
Often listens to, shares with, and supports the efforts of others, but not
always.
[Correct] Correct
Is often publicly critical of the project or the work of other members of the
group. Is often negative about the task(s). (*)
Is rarely publicly critical of the project or the work of others. Often has a
positive attitude about the task(s).
Is never publicly critical of the project or the work of others. Always has a
positive attitude about the task(s).
[Correct] Correct
[Correct] Correct
1 only
2 only
2 and 3 only
1, 2, and 3 (*)
[Correct] Correct
Neither 1 nor 2
[Correct] Correct
Follow your organization's cybersecurity rules and report issues when they
happen.
[Correct] Correct
Copying and pasting parts of someone else?s work into your own without giving
them credit.
Posting information about people at school that they would never want shared.
[Correct] Correct
Section 1
(Answer all questions in this section)
The procedures
The gallery
The template
[Correct] Correct
File
New
Open
[Correct] Correct
True
False (*)
True
False (*)
[Correct] Correct
[Correct] Correct
True (*)
False
True
False (*)
Click and drag the desired programming instruction into the Procedures tab.
Click and drag the desired programming instruction into the myFirstMethod
tab. (*)
Click and drag the desired programming instruction into the Scene editor.
Click and drag the desired programming instruction into the Functions tab.
10. How do you view the results of procedures entered in the Alice
code editor? Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
Clipboard
Is Enabled
Paste
[Correct] Correct
Bug (*)
Debug
Error
Code
True (*)
False
[Correct] Correct
Section 1
(Answer all questions in this section)
True (*)
False
[Correct] Correct
Click and drag the file from your computer into Alice 3.
Browse for the project using the File System tab. (*)
[Correct] Correct
The gallery
The Scene editor (*)
The template
[Correct] Correct
True
False (*)
[Correct] Correct
5. In Alice, what does the resize handle style do? Mark for
Review
(1) Points
Change size of the object and stretch it along the x, y, and z axes (*)
[Correct] Correct
True
False (*)
[Correct] Correct
Roll
Move
Turn
Spin (*)
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
False
[Correct] Correct
11. Which of the following is not one of the positioning axes used in
Alice 3? Mark for Review
(1) Points
w (*)
[Correct] Correct
Rotation (*)
Default
Translation
Resize
14. Rings will appear around a sub-part indicating how you can
reposition it. True or false? Mark for Review
(1) Points
True (*)
False
1. To access the Alice Code editor from the Scene editor, which button do you
click? Mark for Review
(1) Points
Code Editor
Code
[Correct] Correct
2. The Alice Scene editor contains tools to rotate the camera view.
True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
4. The Procedures tab and the Functions tab are the two tabs
available in the Alice methods panel. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
turn
turnToFace (*)
orientToUpright
moveToward
[Correct] Correct
Count
Do Together
Do In Order (*)
Comment
[Correct] Correct
True
False (*)
Object
Direction (*)
Amount (*)
Text
True (*)
False
True (*)
False
[Correct] Correct
Type comments that describe the sequence of actions in the code segment.
Drag and drop the comments tile above a code segment. (*)
Drag and drop the comments tile below a code segment.
[Correct] Correct
13. Which of the following ways can you alter a procedure in Alice?
Mark for Review
(1) Points
Copy (*)
Count
Disable (*)
Reorder (*)
True
False (*)
Control statements
Procedures
Arguments
[Correct] Correct
True (*)
False
[Correct] Correct
Do In Order
While
Count
Move (*)
Do Together (*)
Do In Order
While
Count
Variable
True
False (*)
True
False (*)
[Correct] Correct
A class of another
An object of another
An instance of another
[Incorrect] Incorrect. Refer to Section 2 Lesson 6.
setClassVehicle
setObjectVehicle
setVehicle (*)
Vehicle
If or Where
3x3=9 (*)
2. Alice uses built-in math operators. They are: Mark for Review
(1) Points
Add
Subtract
Multiply
Divide
All of the above (*)
[Correct] Correct
[Correct] Correct
[Correct] Correct
1. In Alice, where can you view the list of functions available for an object?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
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] Correct
True
False (*)
[Correct] Correct
1. 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] Correct
True
False (*)
[Correct] Correct
True
False (*)
True (*)
False
True (*)
False
[Correct] Correct
True
False (*)
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
1. Which is an example of the Boolean variable type? Mark for Review
(1) Points
Hello World
An object
[Correct] Correct
"Greetings" (*)
"Howdy" (*)
"4" (*)
The instance executes all of the programming statements in their class's act
method once. (*)
The instance executes all of the programming statements in their class's act
method repeatedly until the scenario is stopped.
The instance executes all of the programming statements in their class's act
method two times until the scenario is stopped.
The class executes all of the programming statements in their instance's act
method two times until the scenario is stopped.
Correct Correct
True (*)
False
Correct Correct
True (*)
False
Correct Correct
True (*)
False
Correct 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"
6. What does an instance of the World class do? Mark for Review
(1) Points
Creation of an instance
Compilation (*)
True
False (*)
Correct Correct
Degrees to turn
String statement
Correct Correct
String statement
Parameter void
Incorrect Incorrect. Refer to Section 3 Lesson 2.
True
False (*)
Correct Correct
True
False (*)
True (*)
False
Correct Correct
Draw an image
Import an image
Correct Correct
True
False (*)
Correct Correct
Instance
Class
Field (*)
Syntax
Method
Parnetheses ( )
Asterisks **
10. In Greenfoot, methods can be called in the act method. When the
Act button is clicked in the environment, the methods in the method body of the act
method are executed. True or false? Mark for Review
(1) Points
True (*)
False
Correct Correct
1. The list below provides actions you can perform in the Greenfoot code
editor except one. Which one should be removed? Mark for Review
(1) Points
Write source code to tell the class how to act in the scenario.
Correct Correct
Documentation
Comments
Method body
Class description
Correct Correct
True (*)
False
Correct Correct
Integer
Action
Method
void move()
int getRotation() (*)
void turn()
World getClass()
getRotation()
getXY()
move(): (*)
move(2);
turn(25);
turn(2);
Correct Correct
Code editor
Compilation (*)
Instance creation
Documentation
Correct Correct
True (*)
False
Correct Correct
My program is complete when it runs and I've tested the code. (*)
Section 1
(Answer all questions in this section)
They both allow you to learn the fundamental ideas in programming by creating
objects in a virtual world. (*)
[Correct] Correct
1 only
2 only
3 only
1, 2, and 3
Test
Implement
Create a scenario
Design a storyboard
Shared responsibility
Clear roles
Regular participation
1 only
1 and 2 only
1, 2, and 3 only
1, 2, 3, and 4 (*)
Rarely listens to, shares with, and supports the efforts of others. Often is
not a good team player.
Almost always listens to, shares with, and supports the efforts of others.
Tries to keep people working well together and mentors team members when
appropriate. (*)
Usually listens to, shares, with, and supports the efforts of others. Does
not cause "waves" in the group.
Often listens to, shares with, and supports the efforts of others, but not
always.
Is rarely publicly critical of the project or the work of others. Often has a
positive attitude about the task(s).
Is never publicly critical of the project or the work of others. Always has a
positive attitude about the task(s).
1 only
2 only
2 and 3 only
1, 2, and 3 (*)
[Incorrect] Incorrect. Refer to Section 1 Lesson 2.
Neither 1 nor 2
[Correct] Correct
Follow your organization's cybersecurity rules and report issues when they
happen.
[Correct] Correct
Copying and pasting parts of someone else?s work into your own without giving
them credit.
Posting information about people at school that they would never want shared.
Pretending you are someone else in an online chat room.
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
They both allow you to learn the fundamental ideas in programming by creating
objects in a virtual world. (*)
[Correct] Correct
1 only
2 only
3 only
1, 2, and 3
Test
Implement
Create a scenario
Design a storyboard
[Correct] Correct
Shared responsibility
Clear roles
Regular participation
1 only
1 and 2 only
1, 2, and 3 only
1, 2, 3, and 4 (*)
[Correct] Correct
Rarely listens to, shares with, and supports the efforts of others. Often is
not a good team player.
Almost always listens to, shares with, and supports the efforts of others.
Tries to keep people working well together and mentors team members when
appropriate. (*)
Usually listens to, shares, with, and supports the efforts of others. Does
not cause "waves" in the group.
Often listens to, shares with, and supports the efforts of others, but not
always.
[Correct] Correct
Is often publicly critical of the project or the work of other members of the
group. Is often negative about the task(s). (*)
Is rarely publicly critical of the project or the work of others. Often has a
positive attitude about the task(s).
Is never publicly critical of the project or the work of others. Always has a
positive attitude about the task(s).
[Correct] Correct
1 only
2 only
2 and 3 only
1, 2, and 3 (*)
[Correct] Correct
Neither 1 nor 2
[Correct] Correct
Follow your organization's cybersecurity rules and report issues when they
happen.
[Correct] Correct
Copying and pasting parts of someone else?s work into your own without giving
them credit.
Posting information about people at school that they would never want shared.
[Correct] Correct
Section 1
(Answer all questions in this section)
The procedures
The gallery
The template
[Correct] Correct
File
New
Open
[Correct] Correct
True
False (*)
True
False (*)
[Correct] Correct
[Correct] Correct
True (*)
False
True
False (*)
[Incorrect] Incorrect. Refer to Section 2 Lesson 1.
Click and drag the desired programming instruction into the Procedures tab.
Click and drag the desired programming instruction into the myFirstMethod
tab. (*)
Click and drag the desired programming instruction into the Scene editor.
Click and drag the desired programming instruction into the Functions tab.
10. How do you view the results of procedures entered in the Alice
code editor? Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
Clipboard
Is Enabled
Paste
[Correct] Correct
Bug (*)
Debug
Error
Code
True (*)
False
[Correct] Correct
Section 1
(Answer all questions in this section)
True (*)
False
[Correct] Correct
Click and drag the file from your computer into Alice 3.
Browse for the project using the File System tab. (*)
[Correct] Correct
The gallery
[Correct] Correct
True
False (*)
[Correct] Correct
5. In Alice, what does the resize handle style do? Mark for
Review
(1) Points
Change size of the object and stretch it along the x, y, and z axes (*)
[Correct] Correct
True
False (*)
[Correct] Correct
Roll
Move
Turn
Spin (*)
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
11. Which of the following is not one of the positioning axes used in
Alice 3? Mark for Review
(1) Points
w (*)
[Correct] Correct
Rotation (*)
Default
Translation
Resize
14. Rings will appear around a sub-part indicating how you can
reposition it. True or false? Mark for Review
(1) Points
True (*)
False
1. To access the Alice Code editor from the Scene editor, which button do you
click? Mark for Review
(1) Points
Code Editor
Code
[Correct] Correct
2. The Alice Scene editor contains tools to rotate the camera view.
True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
3. In Alice the Functions tab will display the pre-defined functions
for the selected instance. True or false? Mark for Review
(1) Points
True (*)
False
4. The Procedures tab and the Functions tab are the two tabs
available in the Alice methods panel. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
turn
turnToFace (*)
orientToUpright
moveToward
[Correct] Correct
Count
Do Together
Do In Order (*)
Comment
[Correct] Correct
True
False (*)
Object
Direction (*)
Amount (*)
Text
True (*)
False
True (*)
False
[Correct] Correct
Type comments that describe the sequence of actions in the code segment.
Drag and drop the comments tile above a code segment. (*)
[Correct] Correct
13. Which of the following ways can you alter a procedure in Alice?
Mark for Review
(1) Points
Copy (*)
Count
Disable (*)
Reorder (*)
True
False (*)
Control statements
Procedures
Arguments
All of the above (*)
[Correct] Correct
True (*)
False
[Correct] Correct
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
True (*)
7. In Alice, the vehicle property will associate one object to another. True or
false?
True (*) False
8. In Alice, functions are dragged into the control statement, not the
procedure. True or false?
True False (*)
9. Do In Order and Do Together are the only control statements available in
Alice. True or false?
True False (*)
Code
Project
Class (*)
Program
11. In Alice, when a new procedure is declared, its motions are coded in a
separate tab. True or false?
True (*) False
12. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? (Choose all correct answers)
Object subclass
Biped class (*)
Quadruped class
Person subclass (*)
13. From your Alice lessons, variables are fixed and cannot be changed.
True or false?
True False (*)
14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
10
17. A typical application uses various values and these values continuously
change while the program is running. True or false?
True (*) False
20. From your Alice lessons, how do you add an instance to a scene in Alice?
22. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)
23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.
25. From your Alice lessons, random numbers are set in the distance and
duration arguments in a procedure. True or false?
True (*) False
26. In Greenfoot, what type of parameter does the keyDown method expect?
String (*)
Boolean
Integer
Method
27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World
29. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false?
True (*) False
30. From your Greenfoot lessons, abstraction techniques can only be used
once in a class's source code. True or false?
True False (*)
31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True False (*)
33. From your Greenfoot lessons, how do you call a defined method?
34. 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?
35. From your Greenfoot lessons, to save space in the act method, you can
write an entirely new method below it, called a _____________.
Class method
Instance method
Defined method (*)
World method
Code method
38. From your Greenfoot lessons, which of the following logic operators
represents "and"?
&
&& (*)
=
!
39. We can use the Actor constructor to automatically create Actor instances when
the Greenfoot world is initialized. True or false?
True False (*)
40. Use your Greenfoot knowledge to answer the question: Where are defined
variables typically entered in a class's source code?
42. From your Greenfoot lessons, which axes define an object's position in
a world?
(Choose all correct answers)
x (*)
z
y (*)
w
44. From your Greenfoot lessons, which of the following comparison operators
represents "greater than"?
> (*)
<
= =
! =
45. 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?
turn(18);
48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)
49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);
Spacing
Capitalization
Parenthesis (*)
Comma
Section 2
Design a storyboard
Correct
2. In Alice, which of the following programming statements moves the butterfly
forward, double the distance to the tree? Mark for Review
(1) Points
Correct
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false? Mark for Review
(1) Points
True (*)
False
Correct
True (*)
False
Correct
True (*)
False
Section 2
True (*)
False
Correct
8. In Alice, which of the following are benefits of separating out motions into
their own procedures? Mark for Review
(1) Points
9. In Alice, which of the following instructions move the Blue Tang fish forward
2 meters? Mark for Review
(1) Points
Correct
10. From your Alice lessons, the Do In Order control statement is also referred
to by what other name? Mark for Review
(1) Points
Sequence control
Control order
Order control
Section 2
11. In Alice, which of the following procedures play a sound? Mark for Review
(1) Points
playSound
playAudio (*)
playSoundFile
playFile
12. From your Alice lessons, the "Checklist for Animation Completion" does not
ask questions about the scenario and storyboards, because these are not valid parts
of the animation creation process. True or false? Mark for Review
(1) Points
True
False (*)
Correct
13. From your Alice lessons, when coding for keyboard control, the programmer's
job is to consider at least 70% of every key stroke the user could take. True or
false? Mark for Review
(1) Points
True
False (*)
14. From your Alice lessons, you can run the animation to test that it works
properly. True or false? Mark for Review
(1) Points
True (*)
False
15. Expressions with relational operators produce true and false values. True
or false?
Mark for Review
(1) Points
True (*)
False
Correct
16. 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.
Correct
17. From your Alice lessons, a Do Together statement embedded with two move
statements is an example of what? Mark for Review
(1) Points
Harmony
Compilation
Forward thinking
Nesting (*)
18. In Alice, once procedures are added to a control statement, they cannot be
changed. True or false? Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 5.
19. Do In Order and Do Together are the only control statements available in
Alice. True or false? Mark for Review
(1) Points
True
False (*)
20. From your Alice lessons, built-in functions provide precise property details
for the following areas: Mark for Review
(1) Points
Correct
If the play button is pressed, then play the video one time.
Correct
22. Which of the following statements about methods is false? Mark for Review
(1) Points
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.
Incorrect. Refer to Section 2 Lesson 10.
23. From your Alice lessons, how do you add an instance to a scene in Alice?
Mark for Review
(1) Points
Select the class, then drag the object into the scene. (*)
Correct
24. All objects in Alice have three dimensional coordinates on which axes?
Mark for Review
(1) Points
x (*)
y (*)
z (*)
25. From your Alice lessons, what is a one-shot procedural method? Mark for
Review
(1) Points
Correct
Section 3
26. Which of the following Java syntax is used to correctly create a Duke
subclass? Mark for Review
(1) Points
Correct
True (*)
False
Correct
28. From your Greenfoot lessons, source code is written in the code editor. True
or false? Mark for Review
(1) Points
True (*)
False
Correct
29. In Greenfoot, a variable can be saved and accessed later, even if the
instance no longer exists. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Correct
Section 3
31. In the Greenfoot IDE, which of the following are components of a parameter?
Mark for Review
(1) Points
Parameter return
Parameter method
Parameter void
32. 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
33. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points
34. Greenfoot does not have tools to record sound. True or false? Mark for
Review
(1) Points
True
False (*)
Correct
35. What type of parameter does the Greenfoot playSound method expect? Mark
for Review
(1) Points
Section 3
36. From your Greenfoot lessons, which line of code is missing something?
3 (*)
38. From your Greenfoot lessons, dot notation allows you to use a method from a
different class, if the class you are programming does not possess the method. True
or false? Mark for Review
(1) Points
True (*)
False
Correct
39. Use you Greenfoot knowledge: What range of numbers does the following method
return?
40. 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
Section 3
41. From your Greenfoot lessons, a problem statement defines the purpose for
your game. True or false? Mark for Review
(1) Points
True (*)
False
Correct
42. Use your Greenfoot knowledge: An array object holds a single variable. True
or false? Mark for Review
(1) Points
True
False (*)
Correct
True
False (*)
44. From your Greenfoot lessons, which of the following logic operators
represents "and"? Mark for Review
(1) Points
&
&& (*)
Correct
45. 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?
Mark for Review
(1) Points
True (*)
False
Correct
Section 3
46. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points
The world
The gallery
Correct
True (*)
False
Correct
48. 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 (*)
49. 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
At the top of the source code, before the constructors and methods. (*)
Correct
50. In Greenfoot, we can use the act method in the class to automatically create
the Actor instances when the world is initialized. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Section 2
True
False (*)
[Correct] Correct
3.
Expressions with relational operators produce true and false values. True or
false?
Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
Section 2
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
The Internet
A close friend
[Correct] Correct
10. From your Alice lessons, number, boolean, String and object are
all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False
Section 2
If the play button is pressed, then play the video one time.
[Correct] Correct
An instance
A method (*)
A class
A variable
Image
Class
Procedure (*)
Direction (*)
Amount (*)
14. In Alice, which of the following instructions roll the Blue Tang
fish left 1 meter? Mark for Review
(1) Points
this.blueTang Left 1
[Correct] Correct
15. From your Alice lessons, random numbers are set in the distance
and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
[Correct] Correct
True
False (*)
True
False (*)
[Correct] Correct
20. From your Alice lessons, the If control structure can process one
true and one false response. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
True
False (*)
[Correct] Correct
Object
Distance (*)
Duration (*)
Delay
23. From your Alice lessons, where should comments be placed? Mark
for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
25. In Alice, functions are dragged into the control statement, not
the procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
Section 3
[Correct] Correct
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
True
False (*)
[Correct] Correct
Animal
World (*)
Actor
Vector
30. 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] Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 3
31. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points
[Correct] Correct
3 (*)
[Correct] Correct
33. 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] Correct
34. Greenfoot does not have tools to record sound. True or false?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
keyPress method
keyUp method
keyClick method
Section 3
True (*)
False
[Correct] Correct
True (*)
False
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
True
False (*)
True
False (*)
40. In Greenfoot, what is a common letter used for the loop variable?
Mark for Review
(1) Points
I (*)
[Correct] Correct
Section 3
I = 100 + i
i=1
i = i
i = i + 1 (*)
[Correct] Correct
42. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
The world
The gallery
False (*)
[Correct] Correct
Position
Inherited methods
Defined methods
[Correct] Correct
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
True
False (*)
True (*)
False
[Correct] Correct
[Correct] Correct
MIDTERM 1 VAR 2
14. Define the value of the variable NumSpins based on the following math
calculation:
NumSpins / 3 = 8
� 12 24 (*) 8 NumSpins
15. From your Alice lessons, the "Checklist for Animation Completion" does not ask
questions about the scenario and storyboards, because these are not valid parts of
the animation creation process. True or false? True False (*)
6. From your Alice lessons, which control statement executes instructions
simultaneously?
� Do in order
� Count
� Variable
� Do together (*)
17. In Alice, which of the following instructions roll the Blue Tang fish left 1
meter?
� this.blueTang roll Left 1.0 (*)
� this.blueTang Left 1.0
� this.blueTang Left 1
� this.blueTang roll Left 1
19. Expressions with relational operators produce true and false values. True or
false? True (*) False
20. In Alice, where are arithmetic operators available?
� Amount argument (*)
� Size argument
� Duration argument (*)
� Get Distance functions (*)
� If control
29. What does the following Greenfoot programming statement do? turn(18);
� Turn the object 36 degrees.
� Turn the object 18 degrees. (*)
� Turn the object 18 steps forward.
� Move the object 18 steps forward.
30. In the Greenfoot IDE, which type of variable allows instances to store
information?
� Method variable
� Instance variable (*)
� Class variable
� World variable
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? True (*) False
32.From your Greenfoot lessons, abstraction techniques can only be used once in a
class's source code. True or false? True False (*)
33. From your Greenfoot lessons, what are the ways that you can view a class's
methods?
� In the scenario
� In the class's documentation (*)
� By right-clicking on an instance (*)
� In the Greenfoot gallery
35. In Greenfoot, dot notation is used to call a _____________ from another class.
� Method (*)
� Class
� Signature
� Parameter
36. In Greenfoot, defined methods must be used immediately. True or false?
True False (*)
37. From your Greenfoot lessons, how do you call a defined method?
� 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.
38. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
� Class method
� Instance method
� Defined method (*)
� World method
� Code method
41. From your Greenfoot lessons, when does an if-else statement execute it's
second code segment?
� When a random number is less than 10.
� When an instance is created.
� After the first code segment is executed.
� If a condition is false. (*)
� If a condition is true.
42. From your Greenfoot lessons, which symbol represents string concatenation?
� Symbol &
� Symbol <
� Symbol =
� Symbol + (*)
43. 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") ) (*)
� if (!Greenfoot.isKeyDown && isDown("d") )
44. Use your Greenfoot knowledge to answer the question: String concatenation is a
way to avoid having to write additional characters in your source code. True or
false?
True (*) False
45. In Greenfoot, which method is used to add a new instance to a scenario when the
world is initialized?
� addClass
� addWorld
� addObject (*)
� addInstance
� keyPress method
� keyUp method
� keyDown method (*)
� keyClick method
MIDTERM 1 VAR 2
14. Define the value of the variable NumSpins based on the following math
calculation:
NumSpins / 3 = 8
� 12 24 (*) 8 NumSpins
15. From your Alice lessons, the "Checklist for Animation Completion" does not ask
questions about the scenario and storyboards, because these are not valid parts of
the animation creation process. True or false? True False (*)
6. From your Alice lessons, which control statement executes instructions
simultaneously?
� Do in order
� Count
� Variable
� Do together (*)
17. In Alice, which of the following instructions roll the Blue Tang fish left 1
meter?
� this.blueTang roll Left 1.0 (*)
� this.blueTang Left 1.0
� this.blueTang Left 1
� this.blueTang roll Left 1
19. Expressions with relational operators produce true and false values. True or
false? True (*) False
20. In Alice, where are arithmetic operators available?
� Amount argument (*)
� Size argument
� Duration argument (*)
� Get Distance functions (*)
� If control
29. What does the following Greenfoot programming statement do? turn(18);
� Turn the object 36 degrees.
� Turn the object 18 degrees. (*)
� Turn the object 18 steps forward.
� Move the object 18 steps forward.
30. In the Greenfoot IDE, which type of variable allows instances to store
information?
� Method variable
� Instance variable (*)
� Class variable
� World variable
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? True (*) False
32.From your Greenfoot lessons, abstraction techniques can only be used once in a
class's source code. True or false? True False (*)
33. From your Greenfoot lessons, what are the ways that you can view a class's
methods?
� In the scenario
� In the class's documentation (*)
� By right-clicking on an instance (*)
� In the Greenfoot gallery
35. In Greenfoot, dot notation is used to call a _____________ from another class.
� Method (*)
� Class
� Signature
� Parameter
36. In Greenfoot, defined methods must be used immediately. True or false?
True False (*)
37. From your Greenfoot lessons, how do you call a defined method?
� 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.
38. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
� Class method
� Instance method
� Defined method (*)
� World method
� Code method
39. When a Greenfoot code segment is executed in an if-statement, each line of
code is executed in sequential order. True or false? True (*)
False
40. From your Greenfoot lessons, which type of constructor can be used to automate
creation of Actor instances?
� Animal
� World (*)
� Actor
� Vector
41. From your Greenfoot lessons, when does an if-else statement execute it's
second code segment?
� When a random number is less than 10.
� When an instance is created.
� After the first code segment is executed.
� If a condition is false. (*)
� If a condition is true.
42. From your Greenfoot lessons, which symbol represents string concatenation?
� Symbol &
� Symbol <
� Symbol =
� Symbol + (*)
43. 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") ) (*)
� if (!Greenfoot.isKeyDown && isDown("d") )
44. Use your Greenfoot knowledge to answer the question: String concatenation is a
way to avoid having to write additional characters in your source code. True or
false?
True (*) False
45. In Greenfoot, which method is used to add a new instance to a scenario when the
world is initialized?
� addClass
� addWorld
� addObject (*)
� addInstance
50. In Greenfoot, which method checks if a key on the keyboard has been pressed?
� keyPress method
� keyUp method
� keyDown method (*)
� keyClick method
True (*)
False
[Correct] Correct
2.
Expressions with relational operators produce true and false values. True or
false?
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
Object subclass
Quadruped class
[Correct] Correct
6. The Alice gallery is a collection of 2D models that can be inserted into the
scene. True or false? Mark for Review
(1) Points
True
False (*)
7. From your Alice lessons, how can you locate objects in the Alice
gallery? Mark for Review
(1) Points
Import objects.
Search for objects by keyword. (*)
[Correct] Correct
[Correct] Correct
11. In Alice, which of the following procedures play a sound? Mark for Review
(1) Points
playSound
playAudio (*)
playSoundFile
playFile
[Correct] Correct
12. 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 (*)
13. From your Alice lessons, number, boolean, String and object are
all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. 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 (*)
[Correct] Correct
The Internet
A close friend
[Correct] Correct
True (*)
False
[Correct] Correct
17. Which of the following does not describe methods? Mark for
Review
(1) Points
A subprogram that acts on data and often returns a value.
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
21. In Alice, functions are dragged into the control statement, not the
procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
getObject
getDuration
getDepth
getDistance (*)
[Correct] Correct
True
False (*)
[Correct] Correct
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
26. 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] Correct
27. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points
[Correct] Correct
[Correct] Correct
String (*)
Boolean
Integer
Method
[Correct] Correct
30. In the Greenfoot IDE, what symbols indicate that the variable is
an array? Mark for Review
(1) Points
Curly brackets { }
Semicolon ;
Colon :
[Correct] Correct
String concatenation
Integers
[Correct] Correct
True (*)
False
[Correct] Correct
setImage
GreenfootImage
duke100.png (*)
new
35. From your Greenfoot lessons, where should the stop method be
inserted into the source code? Mark for Review
(1) Points
[Correct] Correct
36. When designing a game in Greenfoot, it helps to define the actions that will
take place in a textual storyboard. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
38. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
39. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
40. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
True
False (*)
x (*)
y (*)
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
49. From your Greenfoot lessons, when a method needs additional data
to perform a task, this data comes from parameters. True or false? Mark for
Review
(1) Points
True (*)
False
[Correct] Correct
50. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
4. From your Alice lessons, you can run the animation to test that
it works properly. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
6. 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
[Correct] Correct
7. From your Alice lessons, random numbers are set in the distance
and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Do in order (*)
Do together
If
For each in
Variable
Feet
Centimeters
Meters (*)
Millimeters
True
False (*)
[Correct] Correct
11. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? Mark for Review
(1) Points
Object subclass
Quadruped class
Code
Project
Class (*)
Program
[Correct] Correct
13. Alice uses built-in math operators; they are: Mark for Review
(1) Points
[Correct] Correct
Size argument
If control
True
False (*)
[Correct] Correct
16. 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] Correct
17. 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
[Correct] Correct
18. From your Alice lessons, once you select an instance, you will
add a class to the scene. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 2 Lesson 2.
Move
Turn
Roll
MoveToward
[Correct] Correct
True (*)
False
[Correct] Correct
21. From your Alice lessons, if you examined a science process that had many
steps, which of the following is a way that you could apply functional
decomposition to this process? Mark for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
Cat jumps into the tree and meows for help. (*)
[Correct] Correct
True
False (*)
[Correct] Correct
getObject
getDuration
getDepth
getDistance (*)
26. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
28. Which method is used to play sound in your Greenfoot game? Mark
for Review
(1) Points
getSound method
findSound method
importSound method
[Correct] Correct
keyPress method
keyUp method
keyClick method
[Correct] Correct
[Correct] Correct
31. From your Greenfoot lessons, dot notation allows you to use a method from a
different class, if the class you are programming does not possess the method. True
or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
34. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points
New subclass...
Set image...
Inspect
Remove
Methods
Classes (*)
Signatures
Parameters
[Correct] Correct
36. 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.
[Correct] Correct
True (*)
False
[Correct] 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
World method
Code method
[Correct] Correct
True
False (*)
[Correct] Correct
41. From your Greenfoot lessons, where should the stop method be inserted into
the source code? Mark for Review
(1) Points
[Correct] Correct
False
[Correct] Correct
addClass
addWorld
addObject (*)
addInstance
[Correct] Correct
44. 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 (*)
[Correct] Correct
()
void
turnLeft (*)
Left
[Correct] Correct
Position
Inherited methods
Defined methods
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
False
49. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points
[Correct] Correct
Local loop
While loop
Condition
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
6. In Alice, you examine code where a bird moves its wings forward and backward
while moving forward simultaneously across the scene. You notice that this set of
procedures are repeated in the code editor ten times to achieve this motion. How
could procedural abstraction be used to make the code simpler and easier to read?
Mark for Review
(1) Points
Use the Count control statement to execute the forward motion of the body and
up and down motion of the wings 10 times. (*)
Use the scene editor to position the wings so that they are up as the body
moves forward.
Declare a separate "fly" procedure for the body moving forward and wings
moving up and down. (*)
[Correct] Correct
x (*)
y (*)
z (*)
[Correct] Correct
True
False (*)
[Correct] Correct
Move
Turn
Roll
MoveToward
[Correct] Correct
False
[Correct] Correct
11. From your Alice lessons, what can be used as a guideline to ensure your
animation fulfills animation principles? Mark for Review
(1) Points
The Internet
A close friend
[Correct] Correct
12. Define the value of the variable LapCount based on the following
math calculation: LapCount + 10 = 15 Mark for Review
(1) Points
5 (*)
15
10
[Correct] Correct
[Correct] Correct
14. From your Alice lessons, which of the following is a tool to show
the logic of an animation? Mark for Review
(1) Points
Visual storyboard
Flowchart (*)
Pie chart
Scene editor
Class chart
repeat...until
if
[Correct] Correct
16. Java programs can be simple programs that run from the command line, or they
can have complex graphical user interfaces. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
[Correct] Correct
True
False (*)
[Correct] Correct
False
[Correct] Correct
Object
Distance (*)
Duration (*)
Delay
[Correct] Correct
21. The Alice code editor contains the tools you need to set up the
background template and objects in the scene. True or false? Mark for Review
(1) Points
True
False (*)
22. In Alice, which of the following instructions roll the Blue Tang
fish left 1 meter? Mark for Review
(1) Points
[Correct] Correct
Hold down the control (CTRL) key, then drag the procedure into the clipboard.
(*)
[Correct] Correct
True (*)
False
[Correct] Correct
j is 5
k is 5 (*)
j is 10
j is 5
k is 5
j is 10
k is 10
j is 15
k is 15
26. 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
27. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
move():
move(2);
turn(38); (*)
turn(38):
[Correct] Correct
30. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points
[Correct] Correct
31. 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] Correct
String (*)
Boolean
Integer
Method
[Correct] Correct
[Correct] Correct
34. In Greenfoot, we can use the act method in the class to
automatically create the Actor instances when the world is initialized. True or
false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
35. Which class holds the method that ends a Greenfoot game? Mark
for Review
(1) Points
Greenfoot (*)
Class
GreenfootImage
Actor
36. Using Greenfoot, how do we change the size and resolution of the
World instance? Mark for Review
(1) Points
[Correct] Correct
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
40. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points
New subclass...
Set image...
Inspect
Remove
[Correct] Correct
41. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points
The world
The gallery
[Correct] Correct
True
False (*)
[Correct] Correct
43. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Local loop
While loop
Condition
[Correct] Correct
True (*)
False
[Correct] Correct
String concatenation
Logic operators (*)
Integers
[Correct] Correct
47. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points
Galleries
Classes (*)
Scenarios
Objects (*)
> (*)
<
= =
! =
[Correct] Correct
49. 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] Correct
50. From your Greenfoot lessons, what are the ways that you can view
a class's methods? Mark for Review
(1) Points
In the scenario
[Correct] Correct
MIDTERM 1 VAR 2
14. Define the value of the variable NumSpins based on the following math
calculation:
NumSpins / 3 = 8
� 12 24 (*) 8 NumSpins
15. From your Alice lessons, the "Checklist for Animation Completion" does not ask
questions about the scenario and storyboards, because these are not valid parts of
the animation creation process. True or false? True False (*)
6. From your Alice lessons, which control statement executes instructions
simultaneously?
� Do in order
� Count
� Variable
� Do together (*)
17. In Alice, which of the following instructions roll the Blue Tang fish left 1
meter?
� this.blueTang roll Left 1.0 (*)
� this.blueTang Left 1.0
� this.blueTang Left 1
� this.blueTang roll Left 1
19. Expressions with relational operators produce true and false values. True or
false? True (*) False
20. In Alice, where are arithmetic operators available?
� Amount argument (*)
� Size argument
� Duration argument (*)
� Get Distance functions (*)
� If control
29. What does the following Greenfoot programming statement do? turn(18);
� Turn the object 36 degrees.
� Turn the object 18 degrees. (*)
� Turn the object 18 steps forward.
� Move the object 18 steps forward.
30. In the Greenfoot IDE, which type of variable allows instances to store
information?
� Method variable
� Instance variable (*)
� Class variable
� World variable
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? True (*) False
32.From your Greenfoot lessons, abstraction techniques can only be used once in a
class's source code. True or false? True False (*)
33. From your Greenfoot lessons, what are the ways that you can view a class's
methods?
� In the scenario
� In the class's documentation (*)
� By right-clicking on an instance (*)
� In the Greenfoot gallery
35. In Greenfoot, dot notation is used to call a _____________ from another class.
� Method (*)
� Class
� Signature
� Parameter
36. In Greenfoot, defined methods must be used immediately. True or false?
True False (*)
37. From your Greenfoot lessons, how do you call a defined method?
� 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.
38. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
� Class method
� Instance method
� Defined method (*)
� World method
� Code method
41. From your Greenfoot lessons, when does an if-else statement execute it's
second code segment?
� When a random number is less than 10.
� When an instance is created.
� After the first code segment is executed.
� If a condition is false. (*)
� If a condition is true.
42. From your Greenfoot lessons, which symbol represents string concatenation?
� Symbol &
� Symbol <
� Symbol =
� Symbol + (*)
43. 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") ) (*)
� if (!Greenfoot.isKeyDown && isDown("d") )
44. Use your Greenfoot knowledge to answer the question: String concatenation is a
way to avoid having to write additional characters in your source code. True or
false?
True (*) False
45. In Greenfoot, which method is used to add a new instance to a scenario when the
world is initialized?
� addClass
� addWorld
� addObject (*)
� addInstance
50. In Greenfoot, which method checks if a key on the keyboard has been pressed?
� keyPress method
� keyUp method
� keyDown method (*)
� keyClick method
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
True (*)
7. In Alice, the vehicle property will associate one object to another. True or
false?
True (*) False
8. In Alice, functions are dragged into the control statement, not the
procedure. True or false?
True False (*)
Code
Project
Class (*)
Program
11. In Alice, when a new procedure is declared, its motions are coded in a
separate tab. True or false?
True (*) False
12. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? (Choose all correct answers)
Object subclass
Biped class (*)
Quadruped class
Person subclass (*)
13. From your Alice lessons, variables are fixed and cannot be changed.
True or false?
True False (*)
14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
10
17. A typical application uses various values and these values continuously
change while the program is running. True or false?
True (*) False
19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above
20. From your Alice lessons, how do you add an instance to a scene in Alice?
22. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)
23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.
25. From your Alice lessons, random numbers are set in the distance and
duration arguments in a procedure. True or false?
True (*) False
26. In Greenfoot, what type of parameter does the keyDown method expect?
String (*)
Boolean
Integer
Method
27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World
29. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false?
True (*) False
30. From your Greenfoot lessons, abstraction techniques can only be used
once in a class's source code. True or false?
True False (*)
31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True False (*)
33. From your Greenfoot lessons, how do you call a defined method?
34. 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?
35. From your Greenfoot lessons, to save space in the act method, you can
write an entirely new method below it, called a _____________.
Class method
Instance method
Defined method (*)
World method
Code method
38. From your Greenfoot lessons, which of the following logic operators
represents "and"?
&
&& (*)
=
!
39. We can use the Actor constructor to automatically create Actor instances when
the Greenfoot world is initialized. True or false?
True False (*)
40. Use your Greenfoot knowledge to answer the question: Where are defined
variables typically entered in a class's source code?
42. From your Greenfoot lessons, which axes define an object's position in
a world?
(Choose all correct answers)
x (*)
z
y (*)
w
44. From your Greenfoot lessons, which of the following comparison operators
represents "greater than"?
> (*)
<
= =
! =
45. 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?
Position
Inherited methods
Scenario name (*)
Defined methods
turn(18);
48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)
49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);
Spacing
Capitalization
Parenthesis (*)
Comma
Design a storyboard
Correct
Correct
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false? Mark for Review
(1) Points
True (*)
False
Correct
True (*)
False
Correct
True (*)
False
Section 2
True (*)
False
Correct
8. In Alice, which of the following are benefits of separating out motions into
their own procedures? Mark for Review
(1) Points
Correct
10. From your Alice lessons, the Do In Order control statement is also referred
to by what other name? Mark for Review
(1) Points
Sequence control
Control order
Order control
Section 2
11. In Alice, which of the following procedures play a sound? Mark for Review
(1) Points
playSound
playAudio (*)
playSoundFile
playFile
12. From your Alice lessons, the "Checklist for Animation Completion" does not
ask questions about the scenario and storyboards, because these are not valid parts
of the animation creation process. True or false? Mark for Review
(1) Points
True
False (*)
Correct
13. From your Alice lessons, when coding for keyboard control, the programmer's
job is to consider at least 70% of every key stroke the user could take. True or
false? Mark for Review
(1) Points
True
False (*)
14. From your Alice lessons, you can run the animation to test that it works
properly. True or false? Mark for Review
(1) Points
True (*)
False
15. Expressions with relational operators produce true and false values. True
or false?
Mark for Review
(1) Points
True (*)
False
Correct
16. 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.
Correct
17. From your Alice lessons, a Do Together statement embedded with two move
statements is an example of what? Mark for Review
(1) Points
Harmony
Compilation
Forward thinking
Nesting (*)
18. In Alice, once procedures are added to a control statement, they cannot be
changed. True or false? Mark for Review
(1) Points
True
False (*)
19. Do In Order and Do Together are the only control statements available in
Alice. True or false? Mark for Review
(1) Points
True
False (*)
20. From your Alice lessons, built-in functions provide precise property details
for the following areas: Mark for Review
(1) Points
Correct
If the play button is pressed, then play the video one time.
If the doorbell rings, then the door opens.
Correct
22. Which of the following statements about methods is false? Mark for Review
(1) Points
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.
23. From your Alice lessons, how do you add an instance to a scene in Alice?
Mark for Review
(1) Points
Select the class, then drag the object into the scene. (*)
Correct
24. All objects in Alice have three dimensional coordinates on which axes?
Mark for Review
(1) Points
x (*)
y (*)
z (*)
Correct
Section 3
26. Which of the following Java syntax is used to correctly create a Duke
subclass? Mark for Review
(1) Points
Correct
True (*)
False
Correct
28. From your Greenfoot lessons, source code is written in the code editor. True
or false? Mark for Review
(1) Points
True (*)
False
Correct
29. In Greenfoot, a variable can be saved and accessed later, even if the
instance no longer exists. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Correct
Section 3
31. In the Greenfoot IDE, which of the following are components of a parameter?
Mark for Review
(1) Points
Parameter return
Parameter method
Parameter void
32. 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
33. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points
34. Greenfoot does not have tools to record sound. True or false? Mark for
Review
(1) Points
True
False (*)
Correct
35. What type of parameter does the Greenfoot playSound method expect? Mark
for Review
(1) Points
Section 3
36. From your Greenfoot lessons, which line of code is missing something?
Mark for Review
(1) Points
3 (*)
38. From your Greenfoot lessons, dot notation allows you to use a method from a
different class, if the class you are programming does not possess the method. True
or false? Mark for Review
(1) Points
True (*)
False
Correct
39. Use you Greenfoot knowledge: What range of numbers does the following method
return?
40. 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
Section 3
41. From your Greenfoot lessons, a problem statement defines the purpose for
your game. True or false? Mark for Review
(1) Points
True (*)
False
Correct
42. Use your Greenfoot knowledge: An array object holds a single variable. True
or false? Mark for Review
(1) Points
True
False (*)
Correct
True
False (*)
44. From your Greenfoot lessons, which of the following logic operators
represents "and"? Mark for Review
(1) Points
&
&& (*)
Correct
45. 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?
Mark for Review
(1) Points
True (*)
False
Correct
Section 3
46. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points
The world
The gallery
Correct
True (*)
False
Correct
48. 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 (*)
49. 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
At the top of the source code, before the constructors and methods. (*)
Correct
50. In Greenfoot, we can use the act method in the class to automatically create
the Actor instances when the world is initialized. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Section 2
True
False (*)
[Correct] Correct
3.
Expressions with relational operators produce true and false values. True or
false?
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
Section 2
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
The Internet
A close friend
[Correct] Correct
10. From your Alice lessons, number, boolean, String and object are
all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False
Section 2
If the play button is pressed, then play the video one time.
[Correct] Correct
An instance
A method (*)
A class
A variable
Image
Class
Procedure (*)
Direction (*)
Amount (*)
14. In Alice, which of the following instructions roll the Blue Tang
fish left 1 meter? Mark for Review
(1) Points
this.blueTang Left 1
this.blueTang roll Left 1
[Correct] Correct
15. From your Alice lessons, random numbers are set in the distance
and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
[Correct] Correct
True
False (*)
True
False (*)
[Correct] Correct
20. From your Alice lessons, the If control structure can process one
true and one false response. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
True
False (*)
[Correct] Correct
Object
Distance (*)
Duration (*)
Delay
23. From your Alice lessons, where should comments be placed? Mark
for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
25. In Alice, functions are dragged into the control statement, not
the procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
Section 3
[Correct] Correct
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
True
False (*)
[Correct] Correct
Animal
World (*)
Actor
Vector
30. 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] Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 3
31. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points
[Correct] Correct
3 (*)
[Correct] Correct
33. 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] Correct
34. Greenfoot does not have tools to record sound. True or false?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
keyPress method
keyUp method
keyClick method
Section 3
False
[Correct] Correct
True (*)
False
True
False (*)
True
False (*)
40. In Greenfoot, what is a common letter used for the loop variable?
Mark for Review
(1) Points
A
I (*)
[Correct] Correct
Section 3
I = 100 + i
i=1
i = i
i = i + 1 (*)
[Correct] Correct
42. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
The gallery
True
False (*)
[Correct] Correct
Position
Inherited methods
Defined methods
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
True
False (*)
True (*)
False
[Correct] Correct
[Correct] Correct
Section 2
True
False (*)
[Correct] Correct
3.
Expressions with relational operators produce true and false values. True or
false?
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
Section 2
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
The Internet
Animation checklist (*)
A close friend
[Correct] Correct
10. From your Alice lessons, number, boolean, String and object are
all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False
Section 2
If the play button is pressed, then play the video one time.
[Correct] Correct
An instance
A method (*)
A class
A variable
Image
Class
Procedure (*)
Direction (*)
Amount (*)
14. In Alice, which of the following instructions roll the Blue Tang
fish left 1 meter? Mark for Review
(1) Points
this.blueTang Left 1
15. From your Alice lessons, random numbers are set in the distance
and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
[Correct] Correct
True
False (*)
False (*)
[Correct] Correct
20. From your Alice lessons, the If control structure can process one
true and one false response. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
True
False (*)
[Correct] Correct
22. In Alice, which of the following arguments are available to
further refine an object's movements? Mark for Review
(1) Points
Object
Distance (*)
Duration (*)
Delay
23. From your Alice lessons, where should comments be placed? Mark
for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
25. In Alice, functions are dragged into the control statement, not
the procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
Section 3
[Correct] Correct
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
True
False (*)
[Correct] Correct
Animal
World (*)
Actor
Vector
30. 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] Correct
Test: Java Fundamentals Mid Term Exam
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 3
31. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points
[Correct] Correct
3 (*)
[Correct] Correct
33. 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] Correct
34. Greenfoot does not have tools to record sound. True or false?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
keyPress method
keyUp method
keyClick method
Section 3
True (*)
False
[Correct] Correct
True (*)
False
True
False (*)
True
False (*)
40. In Greenfoot, what is a common letter used for the loop variable?
Mark for Review
(1) Points
I (*)
X
[Correct] Correct
Section 3
I = 100 + i
i=1
i = i
i = i + 1 (*)
[Correct] Correct
42. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
The world
The gallery
True
False (*)
[Correct] Correct
Position
Inherited methods
Defined methods
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
True
False (*)
True (*)
False
[Correct] Correct
[Correct] Correct
Section 2
(Answer all questions in this section)
Correct Correct
2. Alice uses built-in math operators; they are: Mark for Review
(1) Points
Correct Correct
True
False (*)
Correct Correct
5 (*)
15
10
Correct Correct
Color
Decimal Number
Whole Number
Function (*)
Image
Class
Procedure (*)
Direction (*)
Amount (*)
False
9. 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 (*)
Correct Correct
True (*)
False
Correct Correct
11. 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 (*)
Correct Correct
True (*)
False
Correct Correct
An instance
A method (*)
A class
A variable
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.
Types (*)
Expressions
Variables
Specifications
Size argument
Duration argument (*)
If control
Five dogs all need to bark and run at the same time. (*)
True (*)
False
Correct Correct
21. 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 Correct
22. From your Alice lessons, the IF control structure can process one
true and one false response. True or false? Mark for Review
(1) Points
True (*)
False
Correct Correct
Section 3
(Answer all questions in this section)
23. From your Greenfoot lessons, a scenario is a game or simulation
implemented in Greenfoot. True or false? Mark for Review
(1) Points
True (*)
False
Correct Correct
Dog
Cat
Parrot
Actor (*)
World (*)
Correct Correct
25. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points
26. When designing a game in Greenfoot, it helps to define the actions that will
take place in a textual storyboard. True or false? Mark for Review
(1) Points
True (*)
False
Correct Correct
27. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points
keyPress method
keyUp method
keyClick method
Incorrect Incorrect. Refer to Section 3 Lesson 7.
&
&& (*)
Correct Correct
31. From your Greenfoot lessons, which symbol represents string concatenation?
Mark for Review
(1) Points
Symbol &
Symbol <
Symbol =
Symbol + (*)
Correct Correct
32. From your Greenfoot lessons, when do infinite loops occur? Mark
for Review
(1) Points
Correct Correct
33. 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 (*)
34. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points
Galleries
Classes (*)
Scenarios
Objects (*)
True (*)
False
Correct Correct
True
False (*)
True (*)
False
Correct Correct
True
False (*)
39. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points
True
False (*)
Correct Correct
41. In the Greenfoot IDE, which of the following are components of a parameter?
Mark for Review
(1) Points
Parameter return
Parameter name (*)
Parameter method
Parameter void
Correct Correct
42. From your Greenfoot lessons, to view the methods that a class
inherits, open the code editor and select documentation from the Tools menu. True
or false? Mark for Review
(1) Points
True (*)
False
43. Which class holds the method that ends a Greenfoot game? Mark
for Review
(1) Points
Greenfoot (*)
Class
GreenfootImage
Actor
Correct Correct
44. From your Greenfoot lessons, where should the stop method be
inserted into the source code? Mark for Review
(1) Points
setImage
GreenfootImage
duke100.png (*)
new
46. In Greenfoot, in which programming task are the objects identified? Mark
for Review
(1) Points
Method (*)
Class
Signature
Parameter
Correct Correct
3 (*)
True
False (*)
Correct Correct
Correct Correct
MIDTERM
� args
� n (*)
� i (*)
� t
� <
� >
� = (*)
� //
4. In Alice, functions are dragged into the control statement, not the
procedure. True or false?
True False (*)
7. From your Alice lessons, comments do not affect the functionality or behavior
of objects. True or false?
True (*) False
8. In Alice, inheritance means that the superclass inherits its traits from the
subclass. True or false?
True False (*)
10. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes
� Object subclass
� Quadruped class
12. From your Alice lessons, random numbers are set in the distance and duration
arguments in a procedure. True or false
True (*) False
13. In Alice, which of the following instructions turn the Blue Tang fish right
one half of a meter?
14. The move procedure moves an object in how many different possible directions
� 1
� 4
� 3
� 6 (*)
16. In Alice, we use the While control statement to implement the conditional
loop. True or false?
True (*) False
17. A conditional loop is a loop that will continue forever. True or false?
True False (*)
18. The value that a variable holds must be a whole number, not a decimal. True
or false?
True False (*)
19. From your Alice lessons, what can be used as a guideline to ensure your
animation fulfills animation principles
� The Internet
� A close friend
� An object's orientation
� Error handling
23. From your Alice lessons, how do you add an instance to a scene in Alice?
� Select the instance from your computer's network.
� Select the class, then drag the object into the scene. (*)
24. When you want specific code to be executed only if certain conditions are
met, what type of Java construct would you use
� while loop
� if (*)
� array
� boolean
� Print "A", "B" and the value of num3 on the screen. (*)
26. From your Greenfoot lessons, abstraction techniques can only be used once in a
class's source code. True or false?
True False (*)
27. From your Greenfoot lessons, which of the following are examples of
abstraction?
29. From your Greenfoot lessons, what is the parameter of the following
constructor that creates a new image, and designates it to the Actor class?
� setImage
� GreenfootImage
� duke100.png (*)
� new
30. Use your Greenfoot knowledge to answer the question: Where are defined
variables typically entered in a class's source code
� In the defined method in the source code.
� At the top of the source code, before the constructors and methods. (*)
31. In Greenfoot, a variable can be saved and accessed later, even if the instance
no longer exists. True or false ?
True False (*)
32. From your Greenfoot lessons, when a method needs additional data to perform
a task, this data comes from parameters. True or false?
True (*) False
33. In the Greenfoot IDE, which type of variable allows instances to store
information
� Method variable
� Class variable
� World variable
34. From your Greenfoot lessons, how do you call a defined method?
� Call the method from the act method. (*)
� The gallery
36. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
� Class method
� Instance method
� World method
� Code method
� getSound method
� findSound method
� importSound method
38. In Greenfoot, which method checks if a key on the keyboard has been pressed
� keyPress method
� keyUp method
� keyClick method
39. In the Greenfoot IDE, what symbols indicate that the variable is an array?
� Curly brackets { }
� Semicolon ;
� Colon :
� i=1
� i = i
� i = i + 1 (*)
41. In Greenfoot, what happens if the end to a while loop isn't established?
� The code will keep executing and will never stop. (*)
� The code will execute once and then stop, due to controls in Greenfoot.
43. Use your Greenfoot skills to answer the question. What is incorrect in this
code?
� Spacing missing
� Comma missing
44. From your Greenfoot lessons, a problem statement defines the purpose for
your game. True or false
True (*) False
45. From your Greenfoot lessons, where do you review a class's inherited methods
� Act method
� Documentation (*)
� Inspector
� If-statement
46. From your Greenfoot lessons, the reset button resets the scenario back to its
initial position. True or false?
47. Which of the following Java syntax is used to correctly create a Duke
subclass
50. Read the following method signature. Using your Greenfoot experience, what
does this method do?
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
True (*)
7. In Alice, the vehicle property will associate one object to another. True or
false?
True (*) False
8. In Alice, functions are dragged into the control statement, not the
procedure. True or false?
True False (*)
Code
Project
Class (*)
Program
11. In Alice, when a new procedure is declared, its motions are coded in a
separate tab. True or false?
True (*) False
12. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? (Choose all correct answers)
Object subclass
Biped class (*)
Quadruped class
Person subclass (*)
13. From your Alice lessons, variables are fixed and cannot be changed.
True or false?
True False (*)
14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
10
17. A typical application uses various values and these values continuously
change while the program is running. True or false?
True (*) False
19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above
20. From your Alice lessons, how do you add an instance to a scene in Alice?
22. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)
23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.
25. From your Alice lessons, random numbers are set in the distance and
duration arguments in a procedure. True or false?
True (*) False
26. In Greenfoot, what type of parameter does the keyDown method expect?
String (*)
Boolean
Integer
Method
27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World
29. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false?
True (*) False
30. From your Greenfoot lessons, abstraction techniques can only be used
once in a class's source code. True or false?
True False (*)
31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True False (*)
33. From your Greenfoot lessons, how do you call a defined method?
34. 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?
35. From your Greenfoot lessons, to save space in the act method, you can
write an entirely new method below it, called a _____________.
Class method
Instance method
Defined method (*)
World method
Code method
36. In Greenfoot, which of the following statements could prevent an infinite
loop from occurring?
I = 100 + i
i=1
i = i
i = i + 1 (*)
38. From your Greenfoot lessons, which of the following logic operators
represents "and"?
&
&& (*)
=
!
39. We can use the Actor constructor to automatically create Actor instances when
the Greenfoot world is initialized. True or false?
True False (*)
40. Use your Greenfoot knowledge to answer the question: Where are defined
variables typically entered in a class's source code?
42. From your Greenfoot lessons, which axes define an object's position in
a world?
(Choose all correct answers)
x (*)
z
y (*)
w
44. From your Greenfoot lessons, which of the following comparison operators
represents "greater than"?
> (*)
<
= =
! =
45. 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?
Position
Inherited methods
Scenario name (*)
Defined methods
turn(18);
48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)
49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);
Spacing
Capitalization
Parenthesis (*)
Comma
[Correct] Correct
True (*)
False
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
6. From your Alice lessons, what does the Count control statement
do? Mark for Review
(1) Points
[Correct] Correct
[Correct] Correct
[Correct] Correct
10. 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] Correct
11. In Alice, you can define your own procedures for a class, but not your own
functions. True or false? Mark for Review
(1) Points
True
False (*)
An object's orientation.
Error handling.
[Correct] Correct
True
False (*)
[Correct] Correct
(*)
[Correct] Correct
15. From your Alice lessons, variables are fixed and cannot be
changed. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
16. In Alice, when a new procedure is declared, all subclasses of the superclass
will inherit the procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Code
Project
Class (*)
Program
[Correct] Correct
True (*)
False
[Correct] Correct
19. Java programs can be simple programs that run from the command
line, or they can have complex graphical user interfaces. True or false? Mark
for Review
(1) Points
True (*)
False
[Correct] Correct
20. Each parameter is listed with its name first, then its data type.
True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
21. From your Alice lessons, which programming instruction represents the
following movement: A turtle moves forward half the distance to the flower. Mark
for Review
(1) Points
True
False (*)
[Correct] Correct
Section 3
(Answer all questions in this section)
move(2);
turn(38); (*)
turn(38):
[Correct] Correct
True (*)
False
[Correct] Correct
3 (*)
[Correct] Correct
26. In Greenfoot, objects are created from: Mark for Review
(1) Points
Methods
Classes (*)
Signatures
Parameters
[Correct] Correct
Method (*)
Constructor
Conditional
Class
[Correct] Correct
29. From your Greenfoot lessons, source code is written in the Code
editor. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
> (*)
<
= =
! =
[Correct] Correct
31. From your Greenfoot lessons, which axes define an object's position in a
world? Mark for Review
(1) Points
x (*)
y (*)
w
[Correct] Correct
32. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points
Galleries
Classes (*)
Scenarios
Objects (*)
[Correct] Correct
33. 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] Correct
True
False (*)
[Correct] Correct
()
void
turnLeft (*)
Left
[Correct] Correct
36. From your Greenfoot lessons, when a method needs additional data to perform a
task, this data comes from parameters. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Methods
Classes
Integers (*)
Scenarios
[Correct] Correct
38. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
41. In Greenfoot, which of the following are execution controls? Mark for
Review
(1) Points
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
True
False (*)
[Correct] Correct
43. Greenfoot Actor instances get their images from which of the
following? Mark for Review
(1) Points
Their methods
[Correct] Correct
addClass
addWorld
addObject (*)
addInstance
[Correct] Correct
String (*)
Boolean
Integer
Method
[Correct] Correct
46. 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] Correct
47. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points
[Correct] Correct
48. In Greenfoot, what is a common letter used for the loop variable?
Mark for Review
(1) Points
I (*)
[Correct] Correct
&
&& (*)
!
[Correct] Correct
True (*)
False
[Correct] Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
The procedures
[Correct] Correct
The gallery
File
New
Open
True
False (*)
True
False (*)
[Correct] Correct
6. When is an instance created in Alice? Mark for Review
(1) Points
True (*)
False
True
False (*)
[Correct] Correct
Click and drag the desired programming instruction into the Procedures tab.
Click and drag the desired programming instruction into the myFirstMethod
tab. (*)
Click and drag the desired programming instruction into the Scene editor.
Click and drag the desired programming instruction into the Functions tab.
10. How do you view the results of procedures entered in the Alice
code editor? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Clipboard
Is Enabled
Copy to Clipboard (*)
Paste
Bug (*)
Debug
Error
Code
True (*)
False
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
True (*)
False
[Correct] Correct
Click and drag the file from your computer into Alice 3.
Browse for the project using the File System tab. (*)
[Correct] Correct
The gallery
The template
True
False (*)
5. In Alice, what does the resize handle style do? Mark for
Review
(1) Points
Change size of the object and stretch it along the x, y, and z axes (*)
True
False (*)
Roll
Move
Turn
Spin (*)
True
False (*)
True
False (*)
[Correct] Correct
True (*)
False
11. Which of the following is not one of the positioning axes used in
Alice 3? Mark for Review
(1) Points
w (*)
[Correct] Correct
Rotation (*)
Default
Translation
Resize
[Correct] Correct
14. Rings will appear around a sub-part indicating how you can
reposition it. True or false? Mark for Review
(1) Points
True (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
1. To access the Alice Code editor from the Scene editor, which
button do you click? Mark for Review
(1) Points
Code Editor
Code
2. The Alice Scene editor contains tools to rotate the camera view.
True or false? Mark for Review
(1) Points
True (*)
False
True (*)
False
4. The Procedures tab and the Functions tab are the two tabs
available in the Alice methods panel. True or false? Mark for Review
(1) Points
True (*)
False
turn
turnToFace (*)
orientToUpright
moveToward
[Correct] Correct
Count
Do Together
Do In Order (*)
Comment
[Correct] Correct
True
False (*)
[Correct] Correct
Object
Direction (*)
Amount (*)
Text
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
Type comments that describe the sequence of actions in the code segment.
Drag and drop the comments tile above a code segment. (*)
13. Which of the following ways can you alter a procedure in Alice?
Mark for Review
(1) Points
Copy (*)
Count
Disable (*)
Reorder (*)
[Correct] Correct
True
False (*)
selection 2 using alice 3
add rotation and randomization quis
1.Which Alice control statement executes a set of procedures simultaneously?
B. Do together (*)
2.Which Alice execution task corresponds with the following storyboard statement?
Cat rolls to the left
. this.Cat roll Left 1.0 (*)
3. In Alice, control statements are dragged into the Code editor. True or false?
true (*)
4. In Alice, the while control statement executes a set of procedures a specific
number of times. True or false?
False (*)
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?
False(*)
6. In Alice, which of the following arguments could be replaced with a random
number?
Distance (*)
Duration (*)
@ DECLARE PROCEDURE QUIS
1.In Alice, what are the forms of a scenario?
A problem to solve. (*)
A task to perform. (*)
2. An animation gives the scenario a purpose. True or false?
False(*)
3. Breaking down a problem or process into smaller parts makes it easier to manage.
True or false?
True(*)
4. A textual storyboard helps the reader understand the actions that will take
place during the animation. True or false?
True(*)
5. Which Alice tool is used to demonstrate the process flow of an animation?
Flowchart(*)
6.A flowchart is a useful way to illustrate how your Alice animation's characters
will look. True or false?
False(*)
7. From your Alice lessons, what does inheritance mean?
Each subclass inherits the methods and properties of its superclass. (*)
8. Which of the following would a clown fish object in Alice inherit from its
class?
Fins,Two eyes, Procedure,funcitions ALL OF THE ABOVE (*)
9. Procedural abstraction may need to be implemented if an object in Alice needs to
perform an action, but there isn't an inherited procedure that accomplishes that
action. True or false?
True(*)
10. Which of the following is a reason why procedural abstraction may be used in
programming an animation?
The code is too long. (*)
The code is difficult to read. (*)
The programmer wants to reuse the code. (*)
11. In Alice, new procedures are declared in the Scene editor. True or false?
False(*)
12. In Alice, you could identify when new procedures need to be declared by
reviewing the textual storyboard for the animation. True or false?
True(*)
13. In Alice, which of the following situations could benefit from declaring a new
procedure?
An object does not have a default procedure for a motion, such as swimming.
(*)
Multiple objects need to use a motion, such as bunnies hopping. (*)
A single motion, such as walking, takes up a lot of room in myFirstMethod.
(*)
14. In Alice, if only objects that walk on four legs need to use a procedure, in
which superclass would the procedure be declared?
Quadruped(*)
@USE CONTROL STATEMENT QUIS
1.In Alice, which of the following is not a control statement?
Move(*)
2. In Alice, which control statement is used to invoke simultaneous movement?
Do Together(*)
3. In Alice, a walking motion for a bipedal object can be achieved without the Do
Together control statement. True or false?
False(*)
4. In Alice, different programming is not required for different objects, because
all objects move the same way. True or false?
False(*)
5. In Alice, when two objects are synchronized and move together, this means that
one object is
A vehicle of another (*)
6. In Alice, which procedure is used to assign one object as the vehicle of
another?
setVehicle(*)
@USE FUNCITIONS QUIS
1.In Alice, where can you view the list of functions available for an object?
Functions tab in the methods panel. (*)
2. In Alice, functions ask questions about an object. True or false?
False(*)
@ USE THE IF AND WHILE CONTROL SCTRUCTURES QUIS
1.In Alice, the If control structure can process one true and one false response.
True or false?
True(*)
2. The Alice If control structure requires the false statement to be populated.
True or false?
False(*)
3. A conditional loop is a loop that will continue forever. True or false?
False(*)
4. In Alice, we use the While control statement to implement the conditional loop.
True or false?
True(*)
@ USE EXPRESSIONS QUIS
1.An example of an expression is
3x3=9 (*)
2. Alice uses built-in math operators. They are
Add,subtract,multiply,Devide.ALL OF THE ABOVE(*)
3. In Alice, which of the following programming statements moves the alien backward
the distance to the asteroid, minus 2 meters?
this.Alien move backward {this.Alien getDistanceTo this.Asteroid -2} (*)
4. In Alice, which of the following programming statements moves the cat forward
the distance to the bird
This.Cat move forward {this.Cat getDistanceTo this.Bird} (*)
@ USE VARIABLES QUIS
1.Which is an example of the Boolean variable type?
True or False (*)
2. The initializer of a variable with a TextString value type could be (select all
that apply)
"Greetings" (*)
"Howdy" (*)
"4" (*)
@ USE KEYBOARD CONTROL QUIS
1.With keyboard controls, you can create Alice animations where the user controls
an object that interacts with other objects. True or false?
True(*)
2. Event listeners look for and resopnd to the interactivity of the computer. True
or false?
False(*)
@ DEVELOP A COMPLETE ANIMATION QUIS
1.As the Alice programmer, you render the animation on your own. True or false?
False(*)
2. In Alice, what are the forms of a scenario?
A problem to solve. (*)
A task to perform. (*)
3. What can be used as a guideline to ensure your Alice animation fulsfills
animation principles?
An animation checklist (*)
4. The animation checklist helps you confirm that all elements of the Alice
animation are operating as expected. True or false?
True(*)
5. Which of the following elements of the Alice animation should be tested before
the animation is considered complete?
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. (*)
6. The Alice animation should be tested throughout development, not just at the end
of the animation's development. True or false?
True(*)
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 running?
addDefaultModelManipulation procedure (*)
8. In which Alice class is the addDefaultModelManipulation procedure located?
Scene class (*)
9. When presenting your Alice animation, ensure that your presentation is
thoroughly tested and complete. True or false?
True(*)
10. When presenting your Alice animation, it is not important to give the audience
a reason to listen to the presentation. True or false?
False(*)
@ CORRELATING JAVA VARIABLES,DATA TYPES AND EXPRESSSION WIH ALICE 3 QUIS
1.The list below describes variables. All are correct except which one?
Arranged In Rows and Columns(*)
2.
x > y : true
x < y : false (*)
9. If a value has been assigned to (is stored in) a variable, that value will be
overwritten when another value is assigned to the variable using the assignment ?=?
operator. True or false?
True(*)
10. What is the output produced by the following code?
J is 5
k is 5 (*)
@ CORRELATING JAVA METHODS, CLASSES AND OTHER STRUCTURES WITH
ALICE 3 TOOLS QUIS
1.The list below contains method descriptions. All are correct except which one?
A subprogram that acts on data and often returns a value. (*)
A set of code that is referred to by name. (*)
2. Main is an example of what in the following code?
public static void main (String[] args) {
System.out.println{"Hello World!");
}
A method(*)
3. You have a Class representing Cat. A cat can meow, purr, catch mice, and so on.
When you create a new cat, what is it called?
An Instance(*)
4. You want a block of code to be executed only once if certain conditions are met.
What type of Java construct would you use?
If(*)
5. 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?
If(*)
6. If you need to repeat a group of Java statements many times, which Java
construct should you use?
Do while loop (*)
While loop(*)
7. Review the code below.
Select the result from the following statements about what happens when the loopVal
>= 5 .
The condition loopVal < 5 is tested before executing anything further in the
program.(*)
8. Which of the following statements about methods is false?
Classes must be defined directly within a method definition. (*)
9. In Java, a function is a method that must return a value. True or false?
False(*)
Print "A", "B" and the value of num3 on the screen. (*)
11. Consider the following: You want to use the BufferedReader and
InputStreamReader classes to get user input from the command line. Which one of the
following import statements must you use?
import java.io.*; (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
The instance executes all of the programming statements in their class's act
method once. (*)
The instance executes all of the programming statements in their class's act
method repeatedly until the scenario is stopped.
The instance executes all of the programming statements in their class's act
method two times until the scenario is stopped.
The class executes all of the programming statements in their instance's act
method two times until the scenario is stopped.
True (*)
False
True (*)
False
[Correct] Correct
True (*)
False
[Correct] 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"
6. What does an instance of the World class do? Mark for Review
(1) Points
[Correct] Correct
Creation of an instance
Compilation (*)
True
False (*)
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
Degrees to turn
String statement
Parameter void
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
Draw an image
Import an image
True
False (*)
Instance
Class
Field (*)
Syntax
Method
Parnetheses ( )
Square brackets [ ]
Asterisks **
10. In Greenfoot, methods can be called in the act method. When the
Act button is clicked in the environment, the methods in the method body of the act
method are executed. True or false? Mark for Review
(1) Points
True (*)
False
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
1. The list below provides actions you can perform in the Greenfoot
code editor except one. Which one should be removed? Mark for Review
(1) Points
Write source code to tell the class how to act in the scenario.
[Correct] Correct
Documentation
Comments
Method body
Class description
True (*)
False
[Correct] Correct
Integer
Action
void move()
void turn()
World getClass()
getRotation()
getXY()
[Correct] Correct
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
move(): (*)
move(2);
turn(25);
turn(2);
[Correct] Correct
Code editor
Compilation (*)
Instance creation
Documentation
[Correct] Correct
True (*)
False
My program is complete when it runs and I've tested the code. (*)
[Correct] Correct
Page 1 of 1
Test: Using Randomization and Understanding Dot Notation and Constructors: Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
Greenfoot.getRandomNumber(10,000)
Greenfoot.getRandomNumber(10,001) (*)
Greenfoot.getRandomNumber(9,999)
Greenfoot.getRandomNumber(0-10,000)
>
>= (*)
= =
! =
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
world
constructor
super (*)
addObject
new
object-name.method-name(parameters); (*)
class-name.method-name(parameters);
Method-name.object-name(parameters);
Method-name.object-name;
True
False (*)
False (*)
new (*)
addObject
newObject
newClass
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
1. In the Greenfoot IDE, any new methods you create are written in
the class's source code, below the act method. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
True (*)
False
2. You cannot record unique sounds in Greenfoot. You can only use
the sounds that are stored in the Greenfoot library. True or false? Mark for
Review
(1) Points
True
False (*)
[Correct] Correct
The name of the sound file to play when the key is pressed.
[Correct] Correct
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
Super(300,300,2);
super(2,300,300);
super(300,300,2); (*)
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
[Correct] Correct
addObject
add
new (*)
super
[Correct] Correct
<
== (*)
>
!>
False
[Correct] Correct
True (*)
False
The image file, duke12.png, has just been drawn and imported into the
scenario.
Class.stop( );
Greenfoot.stop( ); (*)
Duke.stop( );
Game.stop(1);
[Correct] Correct
Class menu
Object menu
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
True (*)
False
[Correct] Correct
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
Local variable
Control operator
Loop variable
if statement (*)
while keyword
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
&
&&
! (*)
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
only if both of its operands are true. (*)
Compares two boolean values, and returns a boolean value which is true if and
only if one 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.
True
False (*)
[Correct] Correct
Class name
Objects
Integers
World name
Method (*)
True (*)
False
[Correct] Correct
Instead of entering ".png" after each image file name, add && ".png" after
the imageName value in the programming statement.
Instead of entering ".png" after each image file name, add = ".png" after the
imageName value in the programming statement.
Instead of entering ".png" after each image file name, add + ".png" after the
imageName value in the programming statement. (*)
Instead of entering ".png" after each image file name, add ".png" after the
imageName value in the programming statement.
[Correct] Correct
Page 1 of 1
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 1
(Answer all questions in this section)
Conditional (*)
Repetition
Obsolete
Rewind
[Correct] Correct
Conditional
Repetition (*)
Obsolete
Rewind
[Correct] Correct
/**
* Get value and store in variable
*/
Method
Comment (*)
Variable Assignment
Instruction
termvar = scanterm.nextLine();
Mark for Review
(1) Points
Method
Comment
Instruction
[Correct] Correct
3 (*)
5
6
Change the execution, change the data, change the environment (*)
Change the environment, change the execution, change the language
[Correct] Correct
10. The variations listed below are examples of changing what part of
Q/A testing?
Page 1 of 1
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
True (*)
7. In Alice, the vehicle property will associate one object to another. True or
false?
True (*) False
8. In Alice, functions are dragged into the control statement, not the
procedure. True or false?
True False (*)
Code
Project
Class (*)
Program
11. In Alice, when a new procedure is declared, its motions are coded in a
separate tab. True or false?
True (*) False
12. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? (Choose all correct answers)
Object subclass
Biped class (*)
Quadruped class
Person subclass (*)
13. From your Alice lessons, variables are fixed and cannot be changed.
True or false?
True False (*)
14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
10
17. A typical application uses various values and these values continuously
change while the program is running. True or false?
True (*) False
19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above
20. From your Alice lessons, how do you add an instance to a scene in Alice?
22. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)
23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.
25. From your Alice lessons, random numbers are set in the distance and
duration arguments in a procedure. True or false?
True (*) False
26. In Greenfoot, what type of parameter does the keyDown method expect?
String (*)
Boolean
Integer
Method
27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World
29. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false?
True (*) False
30. From your Greenfoot lessons, abstraction techniques can only be used
once in a class's source code. True or false?
True False (*)
31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True False (*)
33. From your Greenfoot lessons, how do you call a defined method?
34. 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?
38. From your Greenfoot lessons, which of the following logic operators
represents "and"?
&
&& (*)
=
!
39. We can use the Actor constructor to automatically create Actor instances when
the Greenfoot world is initialized. True or false?
True False (*)
40. Use your Greenfoot knowledge to answer the question: Where are defined
variables typically entered in a class's source code?
42. From your Greenfoot lessons, which axes define an object's position in
a world?
(Choose all correct answers)
x (*)
z
y (*)
w
43. When a Greenfoot code segment is executed in an if-statement, each line
of code is executed in sequential order. True or false?
44. From your Greenfoot lessons, which of the following comparison operators
represents "greater than"?
> (*)
<
= =
! =
45. 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?
Position
Inherited methods
Scenario name (*)
Defined methods
turn(18);
48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)
49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);
Spacing
Capitalization
Parenthesis (*)
Comma
Section 2
Design a storyboard
Correct
Correct
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false? Mark for Review
(1) Points
True (*)
False
Correct
True (*)
False
Correct
True (*)
False
Section 2
True (*)
False
Correct
8. In Alice, which of the following are benefits of separating out motions into
their own procedures? Mark for Review
(1) Points
9. In Alice, which of the following instructions move the Blue Tang fish forward
2 meters? Mark for Review
(1) Points
Correct
10. From your Alice lessons, the Do In Order control statement is also referred
to by what other name? Mark for Review
(1) Points
Sequence control
Control order
Order control
Section 2
11. In Alice, which of the following procedures play a sound? Mark for Review
(1) Points
playSound
playAudio (*)
playSoundFile
playFile
12. From your Alice lessons, the "Checklist for Animation Completion" does not
ask questions about the scenario and storyboards, because these are not valid parts
of the animation creation process. True or false? Mark for Review
(1) Points
True
False (*)
Correct
13. From your Alice lessons, when coding for keyboard control, the programmer's
job is to consider at least 70% of every key stroke the user could take. True or
false? Mark for Review
(1) Points
True
False (*)
14. From your Alice lessons, you can run the animation to test that it works
properly. True or false? Mark for Review
(1) Points
True (*)
False
15. Expressions with relational operators produce true and false values. True
or false?
Mark for Review
(1) Points
True (*)
False
Correct
16. 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.
Correct
17. From your Alice lessons, a Do Together statement embedded with two move
statements is an example of what? Mark for Review
(1) Points
Harmony
Compilation
Forward thinking
Nesting (*)
18. In Alice, once procedures are added to a control statement, they cannot be
changed. True or false? Mark for Review
(1) Points
True
False (*)
19. Do In Order and Do Together are the only control statements available in
Alice. True or false? Mark for Review
(1) Points
True
False (*)
20. From your Alice lessons, built-in functions provide precise property details
for the following areas: Mark for Review
(1) Points
Correct
Correct
22. Which of the following statements about methods is false? Mark for Review
(1) Points
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.
23. From your Alice lessons, how do you add an instance to a scene in Alice?
Mark for Review
(1) Points
Select the class, then drag the object into the scene. (*)
Correct
24. All objects in Alice have three dimensional coordinates on which axes?
Mark for Review
(1) Points
x (*)
y (*)
z (*)
25. From your Alice lessons, what is a one-shot procedural method? Mark for
Review
(1) Points
Correct
Section 3
26. Which of the following Java syntax is used to correctly create a Duke
subclass? Mark for Review
(1) Points
Correct
True (*)
False
Correct
28. From your Greenfoot lessons, source code is written in the code editor. True
or false? Mark for Review
(1) Points
True (*)
False
Correct
29. In Greenfoot, a variable can be saved and accessed later, even if the
instance no longer exists. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Correct
Section 3
31. In the Greenfoot IDE, which of the following are components of a parameter?
Mark for Review
(1) Points
Parameter return
Parameter method
Parameter void
32. 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
33. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points
34. Greenfoot does not have tools to record sound. True or false? Mark for
Review
(1) Points
True
False (*)
Correct
35. What type of parameter does the Greenfoot playSound method expect? Mark
for Review
(1) Points
Section 3
36. From your Greenfoot lessons, which line of code is missing something?
Mark for Review
(1) Points
3 (*)
38. From your Greenfoot lessons, dot notation allows you to use a method from a
different class, if the class you are programming does not possess the method. True
or false? Mark for Review
(1) Points
True (*)
False
Correct
39. Use you Greenfoot knowledge: What range of numbers does the following method
return?
40. 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
Section 3
41. From your Greenfoot lessons, a problem statement defines the purpose for
your game. True or false? Mark for Review
(1) Points
True (*)
False
Correct
42. Use your Greenfoot knowledge: An array object holds a single variable. True
or false? Mark for Review
(1) Points
True
False (*)
Correct
True
False (*)
44. From your Greenfoot lessons, which of the following logic operators
represents "and"? Mark for Review
(1) Points
&
&& (*)
Correct
45. 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?
Mark for Review
(1) Points
True (*)
False
Correct
Section 3
46. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points
The world
The gallery
Correct
True (*)
False
Correct
48. 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 (*)
49. 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
At the top of the source code, before the constructors and methods. (*)
Correct
50. In Greenfoot, we can use the act method in the class to automatically create
the Actor instances when the world is initialized. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Section 2
True
False (*)
[Correct] Correct
3.
Expressions with relational operators produce true and false values. True or
false?
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
Section 2
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
9. From your Alice lessons, what can be used as a guideline to
ensure your animation fulfills animation principles? Mark for Review
(1) Points
The Internet
A close friend
[Correct] Correct
10. From your Alice lessons, number, boolean, String and object are
all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False
Section 2
If the play button is pressed, then play the video one time.
[Correct] Correct
An instance
A method (*)
A class
A variable
Image
Class
Procedure (*)
Direction (*)
Amount (*)
14. In Alice, which of the following instructions roll the Blue Tang
fish left 1 meter? Mark for Review
(1) Points
[Correct] Correct
15. From your Alice lessons, random numbers are set in the distance
and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
[Correct] Correct
True
False (*)
[Incorrect] Incorrect. Refer to Section 2 Lesson 2.
True
False (*)
[Correct] Correct
20. From your Alice lessons, the If control structure can process one
true and one false response. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
True
False (*)
[Correct] Correct
Object
Distance (*)
Duration (*)
Delay
23. From your Alice lessons, where should comments be placed? Mark
for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
25. In Alice, functions are dragged into the control statement, not
the procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
Section 3
[Correct] Correct
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
True
False (*)
[Correct] Correct
Animal
World (*)
Actor
Vector
30. 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] Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 3
31. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points
[Correct] Correct
3 (*)
6
[Correct] Correct
33. 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] Correct
34. Greenfoot does not have tools to record sound. True or false?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
keyPress method
keyUp method
keyClick method
Section 3
False
[Correct] Correct
True (*)
False
True
False (*)
True
False (*)
40. In Greenfoot, what is a common letter used for the loop variable?
Mark for Review
(1) Points
I (*)
[Correct] Correct
Section 3
I = 100 + i
i=1
i = i
i = i + 1 (*)
[Correct] Correct
42. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
The world
The gallery
True
False (*)
[Correct] Correct
Position
Inherited methods
Defined methods
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
True
False (*)
False
[Correct] Correct
[Correct] Correct
MIDTERM 1 VAR 2
14. Define the value of the variable NumSpins based on the following math
calculation:
NumSpins / 3 = 8
� 12 24 (*) 8 NumSpins
15. From your Alice lessons, the "Checklist for Animation Completion" does not ask
questions about the scenario and storyboards, because these are not valid parts of
the animation creation process. True or false? True False (*)
6. From your Alice lessons, which control statement executes instructions
simultaneously?
� Do in order
� Count
� Variable
� Do together (*)
17. In Alice, which of the following instructions roll the Blue Tang fish left 1
meter?
� this.blueTang roll Left 1.0 (*)
� this.blueTang Left 1.0
� this.blueTang Left 1
� this.blueTang roll Left 1
19. Expressions with relational operators produce true and false values. True or
false? True (*) False
20. In Alice, where are arithmetic operators available?
� Amount argument (*)
� Size argument
� Duration argument (*)
� Get Distance functions (*)
� If control
29. What does the following Greenfoot programming statement do? turn(18);
� Turn the object 36 degrees.
� Turn the object 18 degrees. (*)
� Turn the object 18 steps forward.
� Move the object 18 steps forward.
30. In the Greenfoot IDE, which type of variable allows instances to store
information?
� Method variable
� Instance variable (*)
� Class variable
� World variable
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? True (*) False
32.From your Greenfoot lessons, abstraction techniques can only be used once in a
class's source code. True or false? True False (*)
33. From your Greenfoot lessons, what are the ways that you can view a class's
methods?
� In the scenario
� In the class's documentation (*)
� By right-clicking on an instance (*)
� In the Greenfoot gallery
35. In Greenfoot, dot notation is used to call a _____________ from another class.
� Method (*)
� Class
� Signature
� Parameter
36. In Greenfoot, defined methods must be used immediately. True or false?
True False (*)
37. From your Greenfoot lessons, how do you call a defined method?
� 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.
38. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
� Class method
� Instance method
� Defined method (*)
� World method
� Code method
41. From your Greenfoot lessons, when does an if-else statement execute it's
second code segment?
� When a random number is less than 10.
� When an instance is created.
� After the first code segment is executed.
� If a condition is false. (*)
� If a condition is true.
42. From your Greenfoot lessons, which symbol represents string concatenation?
� Symbol &
� Symbol <
� Symbol =
� Symbol + (*)
43. 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") ) (*)
� if (!Greenfoot.isKeyDown && isDown("d") )
44. Use your Greenfoot knowledge to answer the question: String concatenation is a
way to avoid having to write additional characters in your source code. True or
false?
True (*) False
45. In Greenfoot, which method is used to add a new instance to a scenario when the
world is initialized?
� addClass
� addWorld
� addObject (*)
� addInstance
50. In Greenfoot, which method checks if a key on the keyboard has been pressed?
� keyPress method
� keyUp method
� keyDown method (*)
� keyClick method
MIDTERM 1 VAR 2
14. Define the value of the variable NumSpins based on the following math
calculation:
NumSpins / 3 = 8
� 12 24 (*) 8 NumSpins
15. From your Alice lessons, the "Checklist for Animation Completion" does not ask
questions about the scenario and storyboards, because these are not valid parts of
the animation creation process. True or false? True False (*)
6. From your Alice lessons, which control statement executes instructions
simultaneously?
� Do in order
� Count
� Variable
� Do together (*)
17. In Alice, which of the following instructions roll the Blue Tang fish left 1
meter?
� this.blueTang roll Left 1.0 (*)
� this.blueTang Left 1.0
� this.blueTang Left 1
� this.blueTang roll Left 1
19. Expressions with relational operators produce true and false values. True or
false? True (*) False
20. In Alice, where are arithmetic operators available?
� Amount argument (*)
� Size argument
� Duration argument (*)
� Get Distance functions (*)
� If control
29. What does the following Greenfoot programming statement do? turn(18);
� Turn the object 36 degrees.
� Turn the object 18 degrees. (*)
� Turn the object 18 steps forward.
� Move the object 18 steps forward.
30. In the Greenfoot IDE, which type of variable allows instances to store
information?
� Method variable
� Instance variable (*)
� Class variable
� World variable
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? True (*) False
32.From your Greenfoot lessons, abstraction techniques can only be used once in a
class's source code. True or false? True False (*)
33. From your Greenfoot lessons, what are the ways that you can view a class's
methods?
� In the scenario
� In the class's documentation (*)
� By right-clicking on an instance (*)
� In the Greenfoot gallery
� Method (*)
� Class
� Signature
� Parameter
36. In Greenfoot, defined methods must be used immediately. True or false?
True False (*)
37. From your Greenfoot lessons, how do you call a defined method?
� 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.
38. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
� Class method
� Instance method
� Defined method (*)
� World method
� Code method
41. From your Greenfoot lessons, when does an if-else statement execute it's
second code segment?
� When a random number is less than 10.
� When an instance is created.
� After the first code segment is executed.
� If a condition is false. (*)
� If a condition is true.
42. From your Greenfoot lessons, which symbol represents string concatenation?
� Symbol &
� Symbol <
� Symbol =
� Symbol + (*)
43. 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") ) (*)
� if (!Greenfoot.isKeyDown && isDown("d") )
44. Use your Greenfoot knowledge to answer the question: String concatenation is a
way to avoid having to write additional characters in your source code. True or
false?
True (*) False
45. In Greenfoot, which method is used to add a new instance to a scenario when the
world is initialized?
� addClass
� addWorld
� addObject (*)
� addInstance
50. In Greenfoot, which method checks if a key on the keyboard has been pressed?
� keyPress method
� keyUp method
� keyDown method (*)
� keyClick method
True (*)
False
[Correct] Correct
2.
Expressions with relational operators produce true and false values. True or
false?
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
Object subclass
Quadruped class
[Correct] Correct
6. The Alice gallery is a collection of 2D models that can be inserted into the
scene. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 2 Lesson 2.
7. From your Alice lessons, how can you locate objects in the Alice
gallery? Mark for Review
(1) Points
Import objects.
[Correct] Correct
[Correct] Correct
Hold down the control (CTRL) key, then drag the procedure into the clipboard.
(*)
11. In Alice, which of the following procedures play a sound? Mark for Review
(1) Points
playSound
playAudio (*)
playSoundFile
playFile
[Correct] Correct
12. 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 (*)
13. From your Alice lessons, number, boolean, String and object are
all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. 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 (*)
[Correct] Correct
The Internet
A close friend
True (*)
False
[Correct] Correct
17. Which of the following does not describe methods? Mark for
Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
21. In Alice, functions are dragged into the control statement, not the
procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
getObject
getDuration
getDepth
getDistance (*)
[Correct] Correct
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
26. 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] Correct
27. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points
[Correct] Correct
[Correct] Correct
String (*)
Boolean
Integer
Method
[Correct] Correct
30. In the Greenfoot IDE, what symbols indicate that the variable is
an array? Mark for Review
(1) Points
Curly brackets { }
Semicolon ;
Colon :
[Correct] Correct
String concatenation
Integers
[Correct] Correct
True (*)
False
[Correct] Correct
setImage
GreenfootImage
duke100.png (*)
new
35. From your Greenfoot lessons, where should the stop method be
inserted into the source code? Mark for Review
(1) Points
In the defined method.
[Correct] Correct
36. When designing a game in Greenfoot, it helps to define the actions that will
take place in a textual storyboard. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
38. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
39. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
[Correct] Correct
40. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
True
False (*)
x (*)
y (*)
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
49. From your Greenfoot lessons, when a method needs additional data
to perform a task, this data comes from parameters. True or false? Mark for
Review
(1) Points
True (*)
False
[Correct] Correct
50. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
4. From your Alice lessons, you can run the animation to test that
it works properly. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
6. 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
[Correct] Correct
7. From your Alice lessons, random numbers are set in the distance
and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Do in order (*)
Do together
If
For each in
Variable
[Incorrect] Incorrect. Refer to Section 2 Lesson 3.
Feet
Centimeters
Meters (*)
Millimeters
True
False (*)
[Correct] Correct
11. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? Mark for Review
(1) Points
Object subclass
Quadruped class
Code
Project
Class (*)
Program
[Correct] Correct
13. Alice uses built-in math operators; they are: Mark for Review
(1) Points
[Correct] Correct
Size argument
If control
True
False (*)
[Correct] Correct
16. 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] Correct
17. 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
[Correct] Correct
18. From your Alice lessons, once you select an instance, you will
add a class to the scene. True or false? Mark for Review
(1) Points
True
False (*)
Move
Turn
Roll
MoveToward
[Correct] Correct
True (*)
False
[Correct] Correct
21. From your Alice lessons, if you examined a science process that had many
steps, which of the following is a way that you could apply functional
decomposition to this process? Mark for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
Cat jumps into the tree and meows for help. (*)
[Correct] Correct
True
False (*)
[Correct] Correct
getObject
getDuration
getDepth
getDistance (*)
26. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
28. Which method is used to play sound in your Greenfoot game? Mark
for Review
(1) Points
getSound method
findSound method
importSound method
[Correct] Correct
keyPress method
keyUp method
keyClick method
[Correct] Correct
[Correct] Correct
31. From your Greenfoot lessons, dot notation allows you to use a method from a
different class, if the class you are programming does not possess the method. True
or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
34. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points
New subclass...
Set image...
Inspect
Remove
Methods
Classes (*)
Signatures
Parameters
[Correct] Correct
36. 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
[Correct] Correct
True (*)
False
[Correct] 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
World method
Code method
[Correct] Correct
True
False (*)
[Correct] Correct
41. From your Greenfoot lessons, where should the stop method be inserted into
the source code? Mark for Review
(1) Points
In the defined method.
[Correct] Correct
True (*)
False
[Correct] Correct
addClass
addWorld
addObject (*)
addInstance
[Correct] Correct
44. 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 (*)
[Correct] Correct
()
void
turnLeft (*)
Left
[Correct] Correct
Position
Inherited methods
Defined methods
[Correct] Correct
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
True (*)
False
49. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points
[Correct] Correct
Local loop
While loop
Condition
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
True (*)
False
[Correct] Correct
6. In Alice, you examine code where a bird moves its wings forward and backward
while moving forward simultaneously across the scene. You notice that this set of
procedures are repeated in the code editor ten times to achieve this motion. How
could procedural abstraction be used to make the code simpler and easier to read?
Mark for Review
(1) Points
Use the Count control statement to execute the forward motion of the body and
up and down motion of the wings 10 times. (*)
Use the scene editor to position the wings so that they are up as the body
moves forward.
Declare a separate "fly" procedure for the body moving forward and wings
moving up and down. (*)
[Correct] Correct
x (*)
y (*)
z (*)
[Correct] Correct
True
False (*)
[Correct] Correct
Move
Turn
Roll
MoveToward
[Correct] Correct
True (*)
False
[Correct] Correct
11. From your Alice lessons, what can be used as a guideline to ensure your
animation fulfills animation principles? Mark for Review
(1) Points
The Internet
A close friend
[Correct] Correct
12. Define the value of the variable LapCount based on the following
math calculation: LapCount + 10 = 15 Mark for Review
(1) Points
2
5 (*)
15
10
[Correct] Correct
[Correct] Correct
14. From your Alice lessons, which of the following is a tool to show
the logic of an animation? Mark for Review
(1) Points
Visual storyboard
Flowchart (*)
Pie chart
Scene editor
Class chart
[Incorrect] Incorrect. Refer to Section 2 Lesson 1.
repeat...until
if
[Correct] Correct
16. Java programs can be simple programs that run from the command line, or they
can have complex graphical user interfaces. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
Object
Distance (*)
Duration (*)
Delay
[Correct] Correct
21. The Alice code editor contains the tools you need to set up the
background template and objects in the scene. True or false? Mark for Review
(1) Points
True
False (*)
22. In Alice, which of the following instructions roll the Blue Tang
fish left 1 meter? Mark for Review
(1) Points
this.blueTang Left 1
[Correct] Correct
Hold down the control (CTRL) key, then drag the procedure into the clipboard.
(*)
[Correct] Correct
False
[Correct] Correct
j is 5
k is 5 (*)
j is 10
j is 5
k is 5
j is 10
k is 10
j is 15
k is 15
26. 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
True
False (*)
[Correct] Correct
move():
move(2);
turn(38); (*)
turn(38):
[Correct] Correct
30. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points
[Correct] Correct
31. 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] Correct
String (*)
Boolean
Integer
Method
[Correct] Correct
33. What type of parameter does the Greenfoot playSound method
expect? Mark for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
35. Which class holds the method that ends a Greenfoot game? Mark
for Review
(1) Points
Greenfoot (*)
Class
GreenfootImage
Actor
36. Using Greenfoot, how do we change the size and resolution of the
World instance? Mark for Review
(1) Points
[Correct] Correct
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
40. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points
New subclass...
Set image...
Inspect
Remove
[Correct] Correct
41. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points
The world
[Correct] Correct
True
False (*)
[Correct] Correct
43. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Local loop
While loop
Condition
[Correct] Correct
45. Use your Greenfoot knowledge to answer the question: String
concatenation is a way to avoid having to write additional characters in your
source code. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
String concatenation
Integers
[Correct] Correct
47. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points
Galleries
Classes (*)
Scenarios
Objects (*)
> (*)
<
= =
! =
[Correct] Correct
49. 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] Correct
50. From your Greenfoot lessons, what are the ways that you can view
a class's methods? Mark for Review
(1) Points
In the scenario
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false
True (*)
7. In Alice, the vehicle property will associate one object to another. True or
false?
True (*) False
8. In Alice, functions are dragged into the control statement, not the
procedure. True or false?
True False (*)
Code
Project
Class (*)
Program
11. In Alice, when a new procedure is declared, its motions are coded in a
separate tab. True or false?
True (*) False
12. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? (Choose all correct answers)
Object subclass
Biped class (*)
Quadruped class
Person subclass (*)
13. From your Alice lessons, variables are fixed and cannot be changed.
True or false?
True False (*)
14. Define the value of the variable LapCount based on the following math
calculation: LapCount + 10 = 15
2
4
5 (*)
15
10
17. A typical application uses various values and these values continuously
change while the program is running. True or false?
True (*) False
19. All objects in Alice have three dimensional coordinates on which axes?
(Choose all correct answers)
x (*)
y (*)
z (*)
w
All of the above
20. From your Alice lessons, how do you add an instance to a scene in Alice?
22. Each parameter is listed with its name first, then its data type. True
or false?
True False (*)
23. Which Alice execution task corresponds with the following storyboard
statement?
Cat turns to face mouse.
25. From your Alice lessons, random numbers are set in the distance and
duration arguments in a procedure. True or false?
True (*) False
26. In Greenfoot, what type of parameter does the keyDown method expect?
String (*)
Boolean
Integer
Method
27. From your Greenfoot lessons, the keyDown method is located in which
class?
Actor
Greenfoot (*)
GreenfootImage
World
29. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false?
True (*) False
30. From your Greenfoot lessons, abstraction techniques can only be used
once in a class's source code. True or false?
True False (*)
31. In Greenfoot, you must first create an instance before you create a class.
True or false?
True False (*)
33. From your Greenfoot lessons, how do you call a defined method?
34. 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?
35. From your Greenfoot lessons, to save space in the act method, you can
write an entirely new method below it, called a _____________.
Class method
Instance method
Defined method (*)
World method
Code method
38. From your Greenfoot lessons, which of the following logic operators
represents "and"?
&
&& (*)
=
!
39. We can use the Actor constructor to automatically create Actor instances when
the Greenfoot world is initialized. True or false?
True False (*)
40. Use your Greenfoot knowledge to answer the question: Where are defined
variables typically entered in a class's source code?
42. From your Greenfoot lessons, which axes define an object's position in
a world?
(Choose all correct answers)
x (*)
z
y (*)
w
44. From your Greenfoot lessons, which of the following comparison operators
represents "greater than"?
> (*)
<
= =
! =
45. 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?
Position
Inherited methods
Scenario name (*)
Defined methods
turn(18);
48. In the Greenfoot IDE, which of the following are components of a parameter?
(Choose all correct answers)
49. From your Greenfoot lessons, what is incorrect in this code example:
setLocation(getX(), (int) (altitude);
Spacing
Capitalization
Parenthesis (*)
Comma
Section 2
Design a storyboard
Correct
Correct
3. From your Alice lessons, the If control structure can process one true and
one false response. True or false? Mark for Review
(1) Points
True (*)
False
Correct
True (*)
False
Correct
True (*)
False
Section 2
True (*)
False
Correct
8. In Alice, which of the following are benefits of separating out motions into
their own procedures? Mark for Review
(1) Points
9. In Alice, which of the following instructions move the Blue Tang fish forward
2 meters? Mark for Review
(1) Points
Correct
10. From your Alice lessons, the Do In Order control statement is also referred
to by what other name? Mark for Review
(1) Points
Sequence control
Control order
Order control
11. In Alice, which of the following procedures play a sound? Mark for Review
(1) Points
playSound
playAudio (*)
playSoundFile
playFile
12. From your Alice lessons, the "Checklist for Animation Completion" does not
ask questions about the scenario and storyboards, because these are not valid parts
of the animation creation process. True or false? Mark for Review
(1) Points
True
False (*)
Correct
13. From your Alice lessons, when coding for keyboard control, the programmer's
job is to consider at least 70% of every key stroke the user could take. True or
false? Mark for Review
(1) Points
True
False (*)
14. From your Alice lessons, you can run the animation to test that it works
properly. True or false? Mark for Review
(1) Points
True (*)
False
15. Expressions with relational operators produce true and false values. True
or false?
Mark for Review
(1) Points
True (*)
False
Correct
16. 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.
Correct
17. From your Alice lessons, a Do Together statement embedded with two move
statements is an example of what? Mark for Review
(1) Points
Harmony
Compilation
Forward thinking
Nesting (*)
18. In Alice, once procedures are added to a control statement, they cannot be
changed. True or false? Mark for Review
(1) Points
True
False (*)
19. Do In Order and Do Together are the only control statements available in
Alice. True or false? Mark for Review
(1) Points
True
False (*)
Incorrect. Refer to Section 2 Lesson 5.
20. From your Alice lessons, built-in functions provide precise property details
for the following areas: Mark for Review
(1) Points
Correct
If the play button is pressed, then play the video one time.
Correct
22. Which of the following statements about methods is false? Mark for Review
(1) Points
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.
23. From your Alice lessons, how do you add an instance to a scene in Alice?
Mark for Review
(1) Points
Correct
24. All objects in Alice have three dimensional coordinates on which axes?
Mark for Review
(1) Points
x (*)
y (*)
z (*)
25. From your Alice lessons, what is a one-shot procedural method? Mark for
Review
(1) Points
Correct
Section 3
26. Which of the following Java syntax is used to correctly create a Duke
subclass? Mark for Review
(1) Points
True (*)
False
Correct
28. From your Greenfoot lessons, source code is written in the code editor. True
or false? Mark for Review
(1) Points
True (*)
False
Correct
29. In Greenfoot, a variable can be saved and accessed later, even if the
instance no longer exists. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Correct
Section 3
31. In the Greenfoot IDE, which of the following are components of a parameter?
Mark for Review
(1) Points
Parameter return
Parameter method
Parameter void
32. 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
33. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points
34. Greenfoot does not have tools to record sound. True or false? Mark for
Review
(1) Points
True
False (*)
Correct
35. What type of parameter does the Greenfoot playSound method expect? Mark
for Review
(1) Points
Section 3
36. From your Greenfoot lessons, which line of code is missing something?
3 (*)
True (*)
False
Correct
39. Use you Greenfoot knowledge: What range of numbers does the following method
return?
40. 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
Section 3
41. From your Greenfoot lessons, a problem statement defines the purpose for
your game. True or false? Mark for Review
(1) Points
True (*)
False
Correct
42. Use your Greenfoot knowledge: An array object holds a single variable. True
or false? Mark for Review
(1) Points
True
False (*)
Correct
True
False (*)
44. From your Greenfoot lessons, which of the following logic operators
represents "and"? Mark for Review
(1) Points
&
&& (*)
Correct
45. 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?
Mark for Review
(1) Points
True (*)
False
Correct
Section 3
46. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points
The world
The act method (*)
The gallery
Correct
True (*)
False
Correct
48. 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 (*)
49. 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
At the top of the source code, before the constructors and methods. (*)
Correct
50. In Greenfoot, we can use the act method in the class to automatically create
the Actor instances when the world is initialized. True or false? Mark for Review
(1) Points
True
False (*)
Correct
Section 2
True
False (*)
[Correct] Correct
3.
Expressions with relational operators produce true and false values. True or
false?
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
Section 2
True (*)
False
[Correct] Correct
False
[Correct] Correct
True
False (*)
[Correct] Correct
The Internet
A close friend
[Correct] Correct
10. From your Alice lessons, number, boolean, String and object are
all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False
If the play button is pressed, then play the video one time.
[Correct] Correct
An instance
A method (*)
A class
A variable
Image
Class
Procedure (*)
Direction (*)
Amount (*)
14. In Alice, which of the following instructions roll the Blue Tang
fish left 1 meter? Mark for Review
(1) Points
this.blueTang Left 1
[Correct] Correct
15. From your Alice lessons, random numbers are set in the distance
and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
[Correct] Correct
True
False (*)
True
False (*)
[Correct] Correct
20. From your Alice lessons, the If control structure can process one
true and one false response. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Section 2
True
False (*)
[Correct] Correct
Object
Distance (*)
Duration (*)
Delay
23. From your Alice lessons, where should comments be placed? Mark
for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
25. In Alice, functions are dragged into the control statement, not
the procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
Section 3
[Correct] Correct
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
True
False (*)
[Correct] Correct
World (*)
Actor
Vector
30. 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] Correct
Review your answers, feedback, and question scores below. An asterisk (*) indicates
a correct answer.
Section 3
31. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points
[Correct] Correct
32. From your Greenfoot lessons, which line of code is missing
something?
3 (*)
[Correct] Correct
33. 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] Correct
34. Greenfoot does not have tools to record sound. True or false?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
keyPress method
keyUp method
keyClick method
Section 3
True (*)
False
[Correct] Correct
True (*)
False
True
False (*)
True
False (*)
40. In Greenfoot, what is a common letter used for the loop variable?
Mark for Review
(1) Points
I (*)
[Correct] Correct
Section 3
I = 100 + i
i=1
i = i
i = i + 1 (*)
[Correct] Correct
42. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
The world
The gallery
True
False (*)
[Correct] Correct
45. In the Greenfoot IDE, which of the following is not a property of
an instance? Mark for Review
(1) Points
Position
Inherited methods
Defined methods
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
True
False (*)
True (*)
False
[Correct] Correct
[Correct] Correct
MIDTERM 1 VAR 2
14. Define the value of the variable NumSpins based on the following math
calculation:
NumSpins / 3 = 8
� 12 24 (*) 8 NumSpins
15. From your Alice lessons, the "Checklist for Animation Completion" does not ask
questions about the scenario and storyboards, because these are not valid parts of
the animation creation process. True or false? True False (*)
6. From your Alice lessons, which control statement executes instructions
simultaneously?
� Do in order
� Count
� Variable
� Do together (*)
17. In Alice, which of the following instructions roll the Blue Tang fish left 1
meter?
� this.blueTang roll Left 1.0 (*)
� this.blueTang Left 1.0
� this.blueTang Left 1
� this.blueTang roll Left 1
19. Expressions with relational operators produce true and false values. True or
false? True (*) False
20. In Alice, where are arithmetic operators available?
� Amount argument (*)
� Size argument
� Duration argument (*)
� Get Distance functions (*)
� If control
29. What does the following Greenfoot programming statement do? turn(18);
� Turn the object 36 degrees.
� Turn the object 18 degrees. (*)
� Turn the object 18 steps forward.
� Move the object 18 steps forward.
30. In the Greenfoot IDE, which type of variable allows instances to store
information?
� Method variable
� Instance variable (*)
� Class variable
� World variable
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? True (*) False
32.From your Greenfoot lessons, abstraction techniques can only be used once in a
class's source code. True or false? True False (*)
33. From your Greenfoot lessons, what are the ways that you can view a class's
methods?
� In the scenario
� In the class's documentation (*)
� By right-clicking on an instance (*)
� In the Greenfoot gallery
35. In Greenfoot, dot notation is used to call a _____________ from another class.
� Method (*)
� Class
� Signature
� Parameter
36. In Greenfoot, defined methods must be used immediately. True or false?
True False (*)
37. From your Greenfoot lessons, how do you call a defined method?
� 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.
38. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
� Class method
� Instance method
� Defined method (*)
� World method
� Code method
42. From your Greenfoot lessons, which symbol represents string concatenation?
� Symbol &
� Symbol <
� Symbol =
� Symbol + (*)
43. 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") ) (*)
� if (!Greenfoot.isKeyDown && isDown("d") )
44. Use your Greenfoot knowledge to answer the question: String concatenation is a
way to avoid having to write additional characters in your source code. True or
false?
True (*) False
45. In Greenfoot, which method is used to add a new instance to a scenario when the
world is initialized?
� addClass
� addWorld
� addObject (*)
� addInstance
50. In Greenfoot, which method checks if a key on the keyboard has been pressed?
� keyPress method
� keyUp method
� keyDown method (*)
� keyClick method
MIDTERM 1 VAR 2
14. Define the value of the variable NumSpins based on the following math
calculation:
NumSpins / 3 = 8
� 12 24 (*) 8 NumSpins
15. From your Alice lessons, the "Checklist for Animation Completion" does not ask
questions about the scenario and storyboards, because these are not valid parts of
the animation creation process. True or false? True False (*)
6. From your Alice lessons, which control statement executes instructions
simultaneously?
� Do in order
� Count
� Variable
� Do together (*)
17. In Alice, which of the following instructions roll the Blue Tang fish left 1
meter?
� this.blueTang roll Left 1.0 (*)
� this.blueTang Left 1.0
� this.blueTang Left 1
� this.blueTang roll Left 1
19. Expressions with relational operators produce true and false values. True or
false? True (*) False
20. In Alice, where are arithmetic operators available?
� Amount argument (*)
� Size argument
� Duration argument (*)
� Get Distance functions (*)
� If control
29. What does the following Greenfoot programming statement do? turn(18);
� Turn the object 36 degrees.
� Turn the object 18 degrees. (*)
� Turn the object 18 steps forward.
� Move the object 18 steps forward.
30. In the Greenfoot IDE, which type of variable allows instances to store
information?
� Method variable
� Instance variable (*)
� Class variable
� World variable
31. Use your Greenfoot knowldege: Abstraction occurs in many different ways in
programming. True or false? True (*) False
32.From your Greenfoot lessons, abstraction techniques can only be used once in a
class's source code. True or false? True False (*)
33. From your Greenfoot lessons, what are the ways that you can view a class's
methods?
� In the scenario
� In the class's documentation (*)
� By right-clicking on an instance (*)
� In the Greenfoot gallery
35. In Greenfoot, dot notation is used to call a _____________ from another class.
� Method (*)
� Class
� Signature
� Parameter
36. In Greenfoot, defined methods must be used immediately. True or false?
True False (*)
37. From your Greenfoot lessons, how do you call a defined method?
� 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.
38. From your Greenfoot lessons, to save space in the act method, you can write an
entirely new method below it, called a _____________.
� Class method
� Instance method
� Defined method (*)
� World method
� Code method
41. From your Greenfoot lessons, when does an if-else statement execute it's
second code segment?
� When a random number is less than 10.
� When an instance is created.
� After the first code segment is executed.
� If a condition is false. (*)
� If a condition is true.
42. From your Greenfoot lessons, which symbol represents string concatenation?
� Symbol &
� Symbol <
� Symbol =
� Symbol + (*)
43. 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") ) (*)
� if (!Greenfoot.isKeyDown && isDown("d") )
44. Use your Greenfoot knowledge to answer the question: String concatenation is a
way to avoid having to write additional characters in your source code. True or
false?
True (*) False
45. In Greenfoot, which method is used to add a new instance to a scenario when the
world is initialized?
� addClass
� addWorld
� addObject (*)
� addInstance
50. In Greenfoot, which method checks if a key on the keyboard has been pressed?
� keyPress method
� keyUp method
� keyDown method (*)
� keyClick method
True (*)
False
[Correct] Correct
2.
Expressions with relational operators produce true and false values. True or
false?
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
Quadruped class
[Correct] Correct
6. The Alice gallery is a collection of 2D models that can be inserted into the
scene. True or false? Mark for Review
(1) Points
True
False (*)
7. From your Alice lessons, how can you locate objects in the Alice
gallery? Mark for Review
(1) Points
Import objects.
[Correct] Correct
[Correct] Correct
Hold down the control (CTRL) key, then drag the procedure into the clipboard.
(*)
playSound
playAudio (*)
playSoundFile
playFile
[Correct] Correct
12. 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 (*)
13. From your Alice lessons, number, boolean, String and object are
all examples of variable types. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. 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 (*)
[Correct] Correct
The Internet
A close friend
[Correct] Correct
True (*)
False
[Correct] Correct
17. Which of the following does not describe methods? Mark for
Review
(1) Points
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
21. In Alice, functions are dragged into the control statement, not the
procedure. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
getObject
getDuration
getDepth
getDistance (*)
[Correct] Correct
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
26. 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] Correct
27. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points
[Correct] Correct
[Correct] Correct
String (*)
Boolean
Integer
Method
[Correct] Correct
30. In the Greenfoot IDE, what symbols indicate that the variable is
an array? Mark for Review
(1) Points
Curly brackets { }
Semicolon ;
Colon :
[Correct] Correct
String concatenation
Integers
[Correct] Correct
True (*)
False
[Correct] Correct
setImage
GreenfootImage
duke100.png (*)
new
35. From your Greenfoot lessons, where should the stop method be
inserted into the source code? Mark for Review
(1) Points
[Correct] Correct
36. When designing a game in Greenfoot, it helps to define the actions that will
take place in a textual storyboard. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
38. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
39. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
[Correct] Correct
40. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
True
False (*)
x (*)
y (*)
[Correct] Correct
True (*)
False
[Correct] Correct
47. In a Greenfoot if-else statement, if the condition is true, the
if-statement is executed, and then the else-statement is executed. True or false?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
49. From your Greenfoot lessons, when a method needs additional data
to perform a task, this data comes from parameters. True or false? Mark for
Review
(1) Points
True (*)
False
[Correct] Correct
50. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points
In the computer network
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
4. From your Alice lessons, you can run the animation to test that
it works properly. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
6. 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
[Correct] Correct
7. From your Alice lessons, random numbers are set in the distance
and duration arguments in a procedure. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Do in order (*)
Do together
If
For each in
Variable
Feet
Centimeters
Meters (*)
Millimeters
True
False (*)
[Correct] Correct
11. In Alice, a person object inherits its procedures, functions, and properties
from which of the following classes? Mark for Review
(1) Points
Object subclass
Quadruped class
Code
Project
Class (*)
Program
[Correct] Correct
13. Alice uses built-in math operators; they are: Mark for Review
(1) Points
[Correct] Correct
Size argument
If control
True
False (*)
[Correct] Correct
16. 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] Correct
17. 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
[Correct] Correct
18. From your Alice lessons, once you select an instance, you will
add a class to the scene. True or false? Mark for Review
(1) Points
True
False (*)
Move
Turn
Roll
MoveToward
[Correct] Correct
True (*)
False
[Correct] Correct
21. From your Alice lessons, if you examined a science process that had many
steps, which of the following is a way that you could apply functional
decomposition to this process? Mark for Review
(1) Points
[Correct] Correct
22. An Alice object can move in four directions. True or false?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
Cat jumps into the tree and meows for help. (*)
[Correct] Correct
True
False (*)
[Correct] Correct
getObject
getDuration
getDepth
getDistance (*)
26. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
28. Which method is used to play sound in your Greenfoot game? Mark
for Review
(1) Points
getSound method
findSound method
importSound method
[Correct] Correct
keyPress method
keyUp method
keyClick method
[Correct] Correct
[Correct] Correct
31. From your Greenfoot lessons, dot notation allows you to use a method from a
different class, if the class you are programming does not possess the method. True
or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
Run (*)
Act (*)
Speed (*)
Move
Turn
[Correct] Correct
34. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points
New subclass...
Set image...
Inspect
Remove
Methods
Classes (*)
Signatures
Parameters
[Correct] Correct
36. 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
True (*)
False
[Correct] 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
World method
Code method
[Correct] Correct
True
False (*)
[Correct] Correct
41. From your Greenfoot lessons, where should the stop method be inserted into
the source code? Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
43. In Greenfoot, which method is used to add a new instance to a
scenario when the world is initialized? Mark for Review
(1) Points
addClass
addWorld
addObject (*)
addInstance
[Correct] Correct
44. 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 (*)
[Correct] Correct
()
void
turnLeft (*)
Left
[Correct] Correct
46. In the Greenfoot IDE, which of the following is not a property of an
instance? Mark for Review
(1) Points
Position
Inherited methods
Defined methods
[Correct] Correct
orientTo( );
turnAround( );
move ( );
turn( ); (*)
[Correct] Correct
True (*)
False
49. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points
[Correct] Correct
Local loop
While loop
Condition
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
True (*)
False
[Correct] Correct
6. In Alice, you examine code where a bird moves its wings forward and backward
while moving forward simultaneously across the scene. You notice that this set of
procedures are repeated in the code editor ten times to achieve this motion. How
could procedural abstraction be used to make the code simpler and easier to read?
Mark for Review
(1) Points
Use the Count control statement to execute the forward motion of the body and
up and down motion of the wings 10 times. (*)
Use the scene editor to position the wings so that they are up as the body
moves forward.
Declare a separate "fly" procedure for the body moving forward and wings
moving up and down. (*)
[Correct] Correct
x (*)
y (*)
z (*)
True
False (*)
[Correct] Correct
Move
Turn
Roll
MoveToward
[Correct] Correct
True (*)
False
[Correct] Correct
11. From your Alice lessons, what can be used as a guideline to ensure your
animation fulfills animation principles? Mark for Review
(1) Points
The Internet
A close friend
[Correct] Correct
12. Define the value of the variable LapCount based on the following
math calculation: LapCount + 10 = 15 Mark for Review
(1) Points
5 (*)
15
10
[Correct] Correct
14. From your Alice lessons, which of the following is a tool to show
the logic of an animation? Mark for Review
(1) Points
Visual storyboard
Flowchart (*)
Pie chart
Scene editor
Class chart
repeat...until
if
[Correct] Correct
16. Java programs can be simple programs that run from the command line, or they
can have complex graphical user interfaces. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
Object
Distance (*)
Duration (*)
Delay
[Correct] Correct
21. The Alice code editor contains the tools you need to set up the
background template and objects in the scene. True or false? Mark for Review
(1) Points
True
False (*)
22. In Alice, which of the following instructions roll the Blue Tang
fish left 1 meter? Mark for Review
(1) Points
this.blueTang Left 1
[Correct] Correct
Hold down the control (CTRL) key, then drag the procedure into the clipboard.
(*)
[Correct] Correct
True (*)
False
[Correct] Correct
j is 5
k is 5 (*)
j is 10
j is 5
k is 5
j is 10
k is 10
j is 15
k is 15
[Incorrect] Incorrect. Refer to Section 2 Lesson 9.
26. 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
27. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
29. 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] Correct
30. From your Greenfoot lessons, which of the following are examples
of abstraction? Mark for Review
(1) Points
[Correct] Correct
31. 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] Correct
String (*)
Boolean
Integer
Method
[Correct] Correct
[Correct] Correct
True
False (*)
[Correct] Correct
35. Which class holds the method that ends a Greenfoot game? Mark
for Review
(1) Points
Greenfoot (*)
Class
GreenfootImage
Actor
36. Using Greenfoot, how do we change the size and resolution of the
World instance? Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
40. From your Greenfoot lessons, to create a new instance of the Duke
class, you right-click on the class, then select which of the following commands in
the class menu? Mark for Review
(1) Points
New subclass...
Set image...
Inspect
Remove
[Correct] Correct
41. To execute a method in your Greenfoot game, where is it called from? Mark
for Review
(1) Points
The world
The gallery
[Correct] Correct
True
False (*)
[Correct] Correct
43. 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? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
Local loop
While loop
Condition
[Correct] Correct
True (*)
False
[Correct] Correct
String concatenation
Integers
[Correct] Correct
47. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points
Galleries
Classes (*)
Scenarios
Objects (*)
> (*)
<
= =
! =
[Correct] Correct
49. 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] Correct
50. From your Greenfoot lessons, what are the ways that you can view
a class's methods? Mark for Review
(1) Points
In the scenario
[Correct] Correct
An object's orientation.
Error handling.
[Correct] Correct
[Correct] Correct
The code
[Correct] Correct
Visual storyboard
Flowchart (*)
Pie chart
Scene editor
Class chart
[Correct] Correct
[Correct] Correct
[Correct] Correct
The message "Printing Some Text" will be printed until loopVal is no longer
less than 5.
The condition loopVal < 5 is tested after the block is executed. (*)
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
[Correct] Correct
True
False (*)
[Correct] Correct
10. From your Alice lessons, which of the following are reasons why
random numbers would be used by a computer? Mark for Review
(1) Points
11. From your Alice lessons, what is a one-shot procedural method? Mark for
Review
(1) Points
[Correct] Correct
args
n (*)
i (*)
[Correct] Correct
13. 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.
[Correct] Correct
16. Which of the following actions would require a control statement to control
animation timing? Mark for Review
(1) Points
[Correct] Correct
[Correct] Correct
True
False (*)
[Correct] Correct
19. Which of the following is not an Alice variable value type?
Mark for Review
(1) Points
Color
Decimal Number
Whole Number
Function (*)
[Correct] Correct
(*)A
[Correct] Correct
21. 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
[Correct] Correct
True
False (*)
[Correct] Correct
Section 3
(Answer all questions in this section)
23. Which method is used to play sound in your Greenfoot game? Mark
for Review
(1) Points
getSound method
findSound method
importSound method
[Correct] Correct
Subclass
Class
Signature (*)
Parameter
[Correct] Correct
25. 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] Correct
26. Use your Greenfoot skills to answer the question. What is incorrect in this
code?
Spacing missing
Comma missing
[Correct] Correct
Position
Inherited methods
Scenario name (*)
Defined methods
[Correct] Correct
28. From the Greenfoot IDE, where are inherited methods located?
Mark for Review
(1) Points
[Correct] Correct
Methods
Classes
Integers (*)
Scenarios
[Correct] Correct
True
False (*)
[Correct] Correct
31. From your Greenfoot lessons, which of the following are examples of
abstraction? Mark for Review
(1) Points
[Correct] Correct
32. 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? Mark for Review
(1) Points
True
False (*)
33. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
[Correct] Correct
34. From your Greenfoot lessons, what are the ways that you can view
a class's methods? Mark for Review
(1) Points
In the scenario
[Correct] Correct
Act method
Documentation (*)
Inspector
If-statement
[Correct] Correct
36. When designing a game in Greenfoot, it helps to define the actions that will
take place in a textual storyboard. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
move():
move(2);
turn(38); (*)
turn(38):
[Correct] Correct
38. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points
[Correct] Correct
False (*)
[Correct] Correct
if (&&isDown ! Greenfoot.isKeyDown("d") )
[Correct] Correct
String concatenation
Integers
[Correct] Correct
42. Greenfoot Actor instances get their images from which of the
following? Mark for Review
(1) Points
Their methods
[Correct] Correct
True (*)
False
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
46. Which of the following demonstrates a Greenfoot subclass/superclass
relationship? Mark for Review
(1) Points
[Correct] Correct
x (*)
y (*)
[Correct] Correct
True (*)
False
[Correct] Correct
49. In Greenfoot, you can use comparison operators to compare a
variable to a random number. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
> (*)
<
= =
! =
[Correct] Correct
1. What is the result when the following code segment is compiled and executed?
2.2 is displayed
5.656854249492381 is displayed
ClassCastException
[Incorrect] Incorrect. Refer to Section 4 Lesson 3.
Object
Rectangle
double (*)
String
[Correct] Correct
// (*)
/*
*/
/*/
[Correct] Correct
True
False (*)
[Correct] Correct
5. When you open more than one file in Eclipse the system will
__________________. Mark for Review
(1) Points
[Correct] Correct
6. In Eclipse, when you run a Java Application, the results are displayed in a
new window. True or False? Mark for Review
(1) Points
True
False (*)
True
False (*)
Contains a main method, a package, static methods, and classes that define
objects.
[Correct] Correct
Defines where this class lives relative to other classes, and provides a
level of access control.
Provides the compiler information that identifies outside classes used within
the current class. (*)
[Correct] Correct
5 (*)
Black
Forest
[Correct] Correct
alligator (*)
albatross alligator
albatross
a1
[Correct] Correct
1 (*)
11
12
String s="\\\n\"\n\\\n\"";
System.out.println(s);
Mark for Review
(1) Points
\" \"
""\
""
\
""
\
"
\
" (*)
"
\
"
\
"
"
[Correct] Correct
14. Suppose that str1 and str2 are two strings. Which of the
statements or expressions are valid? Mark for Review
(1) Points
Str1 -= str2;
Section 5
(Answer all questions in this section)
<= (*)
!= (*)
16. The three logic operators in Java are: Mark for Review
(1) Points
!=,=,==
&&,!=,=
&,|,=
[Correct] Correct
True
False (*)
[Correct] Correct
int num = 7;
while(num >= 0)
{
num -= 3;
}
System.out.println(num); Mark for Review
(1) Points
-2 (*)
[Correct] Correct
19. In the code fragment below, the syntax for the for loop's
initialization is correct. True or false?
True
False (*)
[Correct] Correct
3; 27; 8 (*)
5; 27; 8
5; 30; 5
3; 9; 11
21. Which of the following declares and initializes a one dimensional array named
words of size 3 so that all entries can be Strings? Mark for Review
(1) Points
String[] words={"Oracle","Academy"}];
22. The following segment of code prints all five of the command line
arguments entered into this program. True or false?
True
False (*)
[Correct] Correct
e (*)
6 (*)
[Correct] Correct
The next line of the program even if it is not the catch block of code.
Where the program catches the exception. (*)
26. Selection sort is efficient for large arrays. True or false? Mark for
Review
(1) Points
True
False (*)
[Correct] Correct
Sequential Search
Selection Sort
Binary Search
[Correct] Correct
True (*)
False
[Correct] Correct
Section 7
(Answer all questions in this section)
30. Consider creating a class Square that extends the Rectangle class
provided below. Knowing that a square always has the same width and length, which
of the following best represents a constructor for the Square class?
(*)
None of the above.
[Correct] Correct
32. Which of the following show the correct UML representation of the
super class Planet and its subclass Earth? Mark for Review
(1) Points
(*)A
True (*)
False
[Correct] Correct
36. The basic unit of encapsulation in Java is the primitive data type. True or
false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
37. The constructor method must always have at least one parameter.
True or false? Mark for Review
(1) Points
True
False (*)
class Account{ ;
private int number;
private String name;;
public Account;
} Mark for Review
(1) Points
True (*)
False
Create all new methods and variables different from the parent class.
[Correct] Correct
A way of redefining methods with the same return type and parameters.
A way to create multiple methods with the same name but different parameters.
The concept that a variable or reference can hold multiple types of objects.
(*)
[Correct] Correct
True (*)
False
[Correct] Correct
Having more than one constructor with the same name but different arguments.
A type of argument that enables calling the same method with a different
number of arguments. (*)
Integers (*)
Strings (*)
Constructors
Arrays (*)
Objects (*)
46. Which segment of code represents a correct way to call a variable argument
method counter that takes in integers as its variable argument parameter? Mark
for Review
(1) Points
counter(int[] numbers);
counter("one","two",String[] nums);
48. Any instance of the same class can assign a new value to a static
variable. True or false? Mark for Review
(1) Points
True (*)
False
False (*)
50. Static classes can have different access specifiers than the
parent class. True or false? Mark for Review
(1) Points
True (*)
False
True
False (*)
Which of the following statements will change the length of s to the largest
length? Mark for Review
(1) Points
s.trim()
s.replace("a", "aa")
s.substring(2)
s.toUpperCase()
[Correct] Correct
String s="\\\n\"\n\\\n\"";
System.out.println(s);
Mark for Review
(1) Points
\" \"
""\
""
\
""
\
"
\
" (*)
"
\
"
\
"
"
alligator (*)
albatross alligator
albatross
a1
Cayrbniz
CayrbnizCayrbniz
yr (*)
ay
ArrayIndexOutofBoundsException is thrown
The physical location onto which you will store and save your files.
The location where you can have one or more stored perspectives.
[Correct] Correct
int
double (*)
boolean
A workspace
A physical location
A perspective (*)
9. A workspace can not have more than one stored projects. True or
false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
10. For every opening curly brace { there does not need to be a
closing curly brace} for the program to compile without error. True or False?
Mark for Review
(1) Points
True
False (*)
Defines where this class lives relative to other classes, and provides a
level of access control. (*)
Provides the compiler information that identifies outside classes used within
the current class.
12. When importing another package into a class you must import only
the package classes that will be called and not the entire package. True or false?
Mark for Review
(1) Points
True
False (*)
int letter='J';
float letter='J';
String letter='J';
char letter='J'; (*)
14. Select the statement that declares a number of type double and
initializes it to 6 times 10 to the 5th power. Mark for Review
(1) Points
double number=6*10^5;
double number=6(e5);
double number=6*10e5;
Section 5
(Answer all questions in this section)
I only
II only
I and III
II and III
>,<,=,!,<=,>=
>,<,==,!=,<=,>= (*)
>,<,=,!=,<=,>=
>,<,=,!=,=<,=>
< (*)
<= (*)
!= (*)
True (*)
False
[Incorrect] Incorrect. Refer to Section 5 Lesson 2.
[Correct] Correct
20. A counter used in a for loop cannot be initialized within the For
loop header. True or false? Mark for Review
(1) Points
True
False (*)
21. If an exception is thrown by a method, where can the catch for the exception
be? Mark for Review
(1) Points
The catch can be in the method that threw the exception or in any other
method that called the method that threw the exception. (*)
[Correct] Correct
22. What is the output of the following segment of code?
321111
11 (*)
111
1111
23. What will array arr contain after the following code segment has
been executed?
9, 6, 1, 3, 0
10, 6, 3, 1, 0
9, 6, 3, 1, 0 (*)
7, 3, 2, 1, 0
True (*)
False
444444 (*)
123321
246642
222222
26. 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 until the array is sorted. True or false? Mark for Review
(1) Points
True
False (*)
27. Of the options below, what is the fastest run-time? Mark for
Review
(1) Points
n
n^2
lg(n) (*)
n*lg(n)
True
False (*)
[Correct] Correct
Section 7
(Answer all questions in this section)
31. 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 his 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 single array?
By ignoring the subject type and initializing all the book as objects of type
Book.
This is not possible. Joe must find another way to collect the books.
Draw the 2nd triangle using the inherited fillPolygon method. (*)
33. Which of the following show the correct UML representation of the
super class Planet and its subclass Earth? Mark for Review
(1) Points
(*)
[Correct] Correct
36. Where should the constructor for a superclass be called? Mark for Review
(1) Points
The super constructor does not need to be called inside the subclass.
[Correct] Correct
True
False (*)
[Correct] Correct
True
False (*)
39. Static classes can return instances of their parent class. True
or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
A variable in a method declaration that gets passed into the method. (*)
Methods
Parameters
Overload constructors
Because you wish to be able to use that object inside of the method.
The method makes changes to the object and you wish to continue to use the
updated object outside of the method. (*)
[Correct] Correct
Integers (*)
Strings (*)
Constructors
Arrays (*)
Objects (*)
45. Which of the following creates an object from the Animal class
listed below:
Animal cat=Animal(50,30);
(*)C
True
False (*)
48. The constructor method must always have at least one parameter.
True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
49. A class always has a constructor. True or false? Mark for
Review
(1) Points
True (*)
False
[Correct] Correct
new (*)
instanceOf
True
False (*)
x (*)
y (*)
z (*)
[Correct] Correct
Infinite loop
Gallery
Procedure (*)
Scene
[Correct] Correct
True (*)
False
[Correct] Correct
6. 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 (*)
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
11. Expressions with relational operators produce true and false values. True or
false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
n (*)
i (*)
[Correct] Correct
13. From your Alice lessons, variables are fixed and cannot be
changed. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
15. In an Alice program, which code is executed when the Run button
is clicked? Mark for Review
(1) Points
[Correct] Correct
16. 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
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
True (*)
False
[Correct] Correct
[Correct] Correct
21. In Alice, which of the following programming statements moves the butterfly
forward, double the distance to the tree? Mark for Review
(1) Points
22. In Alice, we can avoid object collision using what? Mark for
Review
(1) Points
[Correct] Correct
Section 3
(Answer all questions in this section)
[Correct] Correct
24. From your Greenfoot lessons, instances do not have any memory.
True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
26. In Greenfoot, a variable can be saved and accessed later, even if the
instance no longer exists. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
28. From your Greenfoot lessons, how do you call a defined method?
Mark for Review
(1) Points
[Correct] Correct
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
From your Greenfoot lessons, which of the following methods return the
current rotation of the object? Mark for Review
(1) Points
World getClass()
World getWorld()
[Correct] Correct
keyPress method
keyUp method
keyClick method
[Correct] Correct
If a condition is true.
[Correct] Correct
34. 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] Correct
35. From your Greenfoot lessons, what can methods belong to? Mark
for Review
(1) Points
Galleries
Classes (*)
Scenarios
Objects (*)
[Correct] Correct
Read the following method signature. Using your Greenfoot experience, what does
this method do?
[Correct] Correct
True (*)
False
[Correct] Correct
38. From your Greenfoot lessons, which of the following is not a step
to creating a new subclass? Mark for Review
(1) Points
Right-click on a superclass.
[Correct] Correct
39. 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
At the top of the source code, before the constructors and methods. (*)
[Correct] Correct
>= operator
== operator (*)
= operator
!= operator
[Correct] Correct
41. From your Greenfoot lessons, where should the stop method be inserted into
the source code? Mark for Review
(1) Points
[Correct] Correct
I = 100 + i
i=1
i = i
i = i + 1 (*)
[Correct] Correct
43. From your Greenfoot lessons, what is a loop? Mark for Review
(1) Points
[Correct] Correct
Local loop
While loop
Condition
[Correct] Correct
45. In the Greenfoot IDE, what symbols indicate that the variable is
an array? Mark for Review
(1) Points
Curly brackets { }
Semicolon ;
Colon :
[Correct] Correct
46. From your Greenfoot lessons, how do you test that your code does not contain
bugs? Mark for Review
(1) Points
[Correct] Correct
47. 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 (*)
[Correct] Correct
[Correct] Correct
49. Use your Greenfoot skills to answer the question. What is
incorrect in this code?
Spacing missing
Comma missing
[Correct] Correct
Method
Comment
Constructor (*)
Class
1. Which of the following creates a class named Diver with one constructor, and
2 instance variables maxDepth and certified? Mark for Review
(1) Points
(*)
[Correct] Correct
class (*)
classpath
method
package
[Correct] Correct
[Correct] Correct
[Correct] Correct
instance variables
instance methods
constructors
comments
[Correct] Correct
Animal dog=Animal(50,30);
True
False (*)
[Correct] Correct
Car c=Car();
Car c;
[Correct] Correct
9. The following statement compiles and executes. What can you say
for sure?
submarine.dive(depth); Mark for Review
(1) Points
[Correct] Correct
(*)
[Correct] Correct
11. What value will be returned when the setValue method is called?
35
36
37 (*)
38
[Correct] Correct
12. The return value of a method can only be a primitive type and not
an object. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
13. Which of the following calls the method moveUp in the class
below:
[Correct] Correct
True (*)
False
[Correct] Correct
15. The constructor of a class has the same name as the class. True
or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
[Correct] Correct
new (*)
class
instanceOf
[Correct] Correct
18. Consider:
MyClass m = MyClass;
MyClass m = MyClass();
[Correct] Correct
The operating system periodically deletes all of the Java files available on
the system.
When all references to an object are gone, the memory used by the object is
automatically reclaimed. (*)
The JVM checks the output of any Java program and deletes anything that does
not make sense.
[Correct] Correct
20. Which of the following keywords are used to access the instance
variables of an object from within the class code for that object? Mark for
Review
(1) Points
public
private
protected
this (*)
[Correct] Correct
(*)
[Correct] Correct
(*)
[Correct] Correct
Page 1 of 1
1. Static variables can't use which of the following modifiers? Mark for
Review
(1) Points
Public
Protected
Friendly (*)
Default
Private
True (*)
False
[Correct] Correct
3. You can create static class methods inside any Java class. True
or false? Mark for Review
(1) Points
True (*)
False
True
False (*)
[Correct] Correct
True
False (*)
True (*)
False
[Correct] Correct
2 or more
None
9. Which case does a recursive method call last? Mark for Review
(1) Points
Recursive Case
Convergence Case
Basic Case
10. A non-linear recursive method can call how many copies of itself?
Mark for Review
(1) Points
2 or more (*)
None
False (*)
[Correct] Correct
The subclass (or child class) gains access to any non-private methods and
variables of the superclass (or parent class). (*)
[Correct] Correct
Universal Model Light, a program that reads the brightness of any given
lightbulb.
[Correct] Correct
new
public
extends (*)
this
[Correct] Correct
A class that inherits methods and fields from a more general class.
A class that passes down its methods to more specialized classes. (*)
[Correct] Correct
6. Which of the following correctly defines a subclass (or child
class)? Mark for Review
(1) Points
A class that inherits methods and fields from a more general class. (*)
True (*)
False
[Correct] Correct
super.length() = 5
super.length(5)
super.length = 5 (*)
super(length = 5)
The super constructor does not need to be called inside the subclass.
True (*)
False
13. Consider creating a class Square that extends the Rectangle class
provided below. Knowing that a square always has the same width and length, which
of the following best represents a constructor for the Square class?
(*)
Because arrays only work using the same object type and polymorphism provides
a way around this. (*)
True
False (*)
True (*)
False
Yes. Overriding is done within a single class and overloading is done through
a series of superclasses and their subclasses.
Yes. Overriding allows for the creation of an array of different object types
and overloading restricts an array to only contain the same object types.
Yes. Overriding is done in the subclass and allows for redefining a method
inherited from the superclass and overloading is done within a class and allows for
multiple methods with the same name. (*)
[Correct] Correct
Abstract classes
Polymorphism
Inheritance
The Java Virtual Machine does not differentiate abstract classes from
concrete classes.
It is possible to create references of this type. (*)
It would print the array one element at a time. The console screen would
display: 0 18 215 64 11 42
It would print the string returned from the method. The console screen would
display: [0,18,215,64,11,42,] (*)
It would print the array backwards. The console screen would display: 42 11
64 215 18 0
It would print the string returned from the method. The console screen would
display: {0, 18, 215, 64, 11, 42}
It restricts a class from being extendable and restricts methods from being
overridden. (*)
It permits redefining methods of a parent class inside the child class, with
the same name, parameters, and return type.
Providing modular code that can be reused by other programs or classes. (*)
10. Identify the step (s) in creating a Triangle Applet that displays
two triangles. Mark for Review
(1) Points
Draw the 2nd triangle using the inherited fillPolygon method. (*)
1. When Eclipse launches, the Welcome page displays. Once this page is closed
you cannot return to the resources available on this page. True or False? Mark
for Review
(1) Points
True
False (*)
True
False (*)
True (*)
False
Correct
4. Tabs are used when more than one file is open in the edit area.
True or False? Mark for Review
(1) Points
True (*)
False
Correct
6. The ______________ is the location into which you will store and
save your files. Mark for Review
(1) Points
Perspective
Workspace (*)
Editor
True (*)
False
Correct
True (*)
False
Correct
Project
Workspace
Package (*)
Collection
Collect
Compile (*)
Package
Assemble
Incorrect. Refer to Section 4 Lesson 1.
True
False (*)
13. For every opening curly brace { there must be a closing curly
brace} or the program will not compile without error. True or False? Mark for
Review
(1) Points
True (*)
False
Correct
14. Semi-colons at the end of each line are not required to compile
successfully. True or False? Mark for Review
(1) Points
True
False (*)
// (*)
/*
*/
/*/
16. 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
True (*)
False
Correct
Section 1
(Answer all questions in this section)
Example A
Example B (*)
2. When importing another package into a class you must import the
entire package as well as the package classes that will be called. True or False?
Mark for Review
(1) Points
True
False (*)
Contains a main method, a package, static methods, and classes that define objects.
Correct
Contains a main method, a package, static methods, and classes that define objects.
Defines where this class lives relative to other classes, and provides a level of
access control. (*)
Provides the compiler information that identifies outside classes used within the
current class.
Correct
Defines where this class lives relative to other classes, and provides a level of
access control.
Provides the compiler information that identifies outside classes used within the
current class. (*)
Defines where this class lives relative to other classes, and provides a level of
access control.
Provides the compiler information that identifies outside classes used within the
current class.
Precedes the name of the class. (*)
Section 1
(Answer all questions in this section)
int j=7,k=5,m=8,result;
result=j/m*k;
System.out.println(result); Mark for Review
(1) Points
0 (*)
4.375
0.175
280
Correct
int j=7,k=5,m=8,result;
result=j-k%3*m;
System.out.println(result); Mark for Review
(1) Points
16
-9 (*)
double x=Math.sqrt(16);
double x=Math.pow(3,4)*5.0;
double x=Math.PI*5.0;
double a=15^8;
int a=Math.pow(8,5);
int a=Math.pow(5,8);
double a=pow(8,5);
char number;
int number;
boolean number;
Incorrect. Refer to Section 4 Lesson 3.
String
int (*)
Rectangle
Object
R2d2
dgo2sleep
4geeks (*)
to_be_or_not_to_be
int x=6;
double d=4.5;
char c='r';
Incorrect. Refer to Section 4 Lesson 3.
double number=3*10^4;
double number=3(e4);
double number=3*10e4;
10. Which line of code does not assign 3.5 to the variable x? Mark
for Review
(1) Points
double x=3.5
x=3.5;
3.5=x; (*)
x=7.0/2.0;
You are writing a class and are using a global variable. Inside a method you
declare a local variable with the same name as the global variable.
This programming style is poor because inside the method the global variable will
have precedence over the local variable with the same name.
True
False (*)
18 (*)
15
Correct
13. Which line of Java code properly calculates the volume of a cone
using
double V=1/3*3.14*r*r*h;
double V=1/3*Math.PI*Math.pow(r,2)*h;
double V=(double)1/3*Math.PI*Math.pow(2,r)*h;
double V=1/3*3.14*r(2)*h;
Which line of Java code properly casts one type into another without data loss?
Mark for Review
(1) Points
double x=(double)z/m; (*)
double x=z/m;
double x=(double)(z/m);
Correct
Section 1
(Answer all questions in this section)
6 (*)
Hudson
river
Correct
String str;
str="str";
String s="str";
True (*)
False
Correct
String name
int name;
double name;
Correct
String s3 = s1 - s2;
s1 <= s2
s1.compareTo(s2); (*)
int m = s1.length(); (*)
PoliiPolii (*)
Polii
auaacauaac
auaac
ArrayIndexOutofBoundsException is thrown
Correct
"\\\\\"
\"\\\\\"
"\\" (*)
"\\\"
""\\"
""\"
""\
" (*)
"""\
""
""\
""
True (*)
False
10. Which of the following creates a String named string? Mark for
Review
(1) Points
char string;
String s;
String String;
String char;
11. Given the code below, which of the following would equate to
true?
String s1 = "yes";
String s2 = "yes";
String s3 = new String(s1); Mark for Review
(1) Points
s1 == s2 (*)
s1 = s2
s3 == s1
s1.equals(s2) (*)
s3.equals(s1) (*)
12. The String methods equals and compareTo perform the exact same
function. True or false? Mark for Review
(1) Points
True
False (*)
13. The == operator can be used to compare two String objects. The
result is always true if the two strings are identical. True or false? Mark for
Review
(1) Points
True
False (*)
True
False (*)
15. Given the code below, which of the following calls are valid?
s.trim() (*)
s.substring(2) (*)
s.toUpperCase() (*)
s.setCharAt(1,'A')
3 (*)
11
12
Incorrect. Refer to Section 4 Lesson 4.
55555
87668 (*)
AtlanticPacificIndianArcticSouthern
An ArrayIndexOutofBoundsException is thrown.
55555
87658
AtlanticPacificIndianArcticSouthern
Section 1
(Answer all questions in this section)
3 (*)
Scanner in = Scanner(System.in);
Correct
3. Which of the two diagrams below illustrate the correct syntax for
variables used in an if-else statement?
Example A (*)
Example B
Correct
False
Correct
>,<,=,!,<=,>=
>,<,=,!=,=<,=>
>,<,=,!=,<=,>=
>,<,==,!=,<=,>= (*)
True
False (*)
!=,=,==
&&,!=,=
&,|,=
Incorrect. Refer to Section 5 Lesson 1.
The = is use to assign values to variables and the == compares values. (*)
There is no difference.
True (*)
False
Correct
default(input)
switch '+':
answer+=num;
break;
case '-':
answer-=num;
break;
!default
System.out.println("Invalid input"); Mark for Review
(1) Points
True
False (*)
Correct
11. How would you use the ternary operator to rewrite this if
statement?
if (skillLevel > 5)
numberOfEnemies = 10;
else
numberOfEnemies = 5; Mark for Review
(1) Points
12. How would you use the ternary operator to rewrite this if
statement?
if (gender == "male")
System.out.print("Mr.");
else
System.out.print("Ms."); Mark for Review
(1) Points
Correct
Section 1
(Answer all questions in this section)
A set of logic that is repeatedly executed until a certain condition is met. (*)
A segment of code that may only ever be executed once per call of the program.
True (*)
False
Correct
while (*)
if/else
do-while (*)
for (*)
Incorrect. Refer to Section 5 Lesson 2.
Correct
Taking coins out of a pile one at a time and adding their value to the total until
there are no more coins in the pile to add.
Petting each animal at the pet store one at a time until all the animals have been
petted.
A DO-WHILE loop does not exist in Java and a WHILE loop does.
A DO-WHILE loop includes an int that serves as a counter and a WHILE loop does not.
A DO-WHILE loop will always execute the code at least once, even if the conditional
statement for the WHILE is never true. A WHILE loop is only executed if the
conditional statement is true. (*)
True
False (*)
Correct
True (*)
False
Correct
9. For both the if-else construct and the for loop, it is true to
say that when the condition statement is met, the construct is exited. True or
False? Mark for Review
(1) Points
True
False (*)
True
False (*)
for(int i = 0; i == 6; i++)
1. Alice uses built-in math operators; they are: Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
5. From your Alice lessons, which of the following are reasons why
random numbers would be used by a computer? Mark for Review
(1) Points
(Choose all correct answers)
[Correct] Correct
[Correct] Correct
8. Each parameter is listed with its name first, then its data type.
True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
[Correct] Correct
True (*)
False
[Correct] Correct
11. 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] Correct
An object's orientation.
Error handling.
[Correct] Correct
13. From your Alice lessons, variables are fixed and cannot be
changed. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
Color
Decimal Number
Whole Number
Function (*)
[Correct] Correct
True
False (*)
[Correct] Correct
16. From your Alice lessons, built-in functions provide precise property details
for the following areas: Mark for Review
(1) Points
[Correct] Correct
True (*)
False
[Correct] Correct
x > y : x > y
x < y : x < y
x > y : 1
x < y : 0
x > y : 0
x < y : 1
x > y : true
x < y : false (*)
x > y : false
x < y : true
args
n (*)
i (*)
[Correct] Correct
20. From your Alice lessons, which of the following are types of
storyboards? Mark for Review
(1) Points
Textual (*)
Factual
Visual (*)
Fictional
21. In Alice, which of the following is the most likely situation where
procedural abstraction could be used? Mark for Review
(1) Points
Five dogs all need to bark and run at the same time. (*)
[Correct] Correct
22. Before you can begin to develop the animation storyboard, what
must be defined? Mark for Review
(1) Points
The code
Section 3
(Answer all questions in this section)
23. 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? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
26. From your Greenfoot lessons, what types of values cannot be stored in a local
variable? Mark for Review
(1) Points
Objects
Integers
World name
method (*)
True (*)
False
[Correct] Correct
if (&&isDown ! Greenfoot.isKeyDown("d") )
[Correct] Correct
Local loop
While loop
Condition
[Correct] Correct
30. From your Greenfoot lessons, how do you test that your code does
not contain bugs? Mark for Review
(1) Points
[Correct] Correct
31. 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 (*)
[Correct] Correct
False
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
Actor
Greenfoot (*)
GreenfootImage
World
[Correct] Correct
36. From your Greenfoot lessons, which axes define an object's position in a
world? Mark for Review
(1) Points
x (*)
y (*)
[Correct] Correct
Animal
World (*)
Actor
Vector
[Correct] Correct
True
False (*)
[Correct] Correct
True (*)
False
[Correct] Correct
Methods
Classes (*)
Signatures
Parameters
[Correct] Correct
41. In Greenfoot, in which programming task are the objects identified? Mark
for Review
(1) Points
[Correct] Correct
[Correct] Correct
True (*)
False
[Correct] Correct
44. In Greenfoot, you must first create an instance before you create
a class. True or false? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
45. From your Greenfoot lessons, to view the methods that a class
inherits, open the code editor and select documentation from the Tools menu. True
or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
46. From your Greenfoot lessons, which of the following are properties of an
instance? Mark for Review
(1) Points
Size
Color
Image file
Methods
[Correct] Correct
Methods
Classes
Integers (*)
Scenarios
Position
Inherited methods
Defined methods
True (*)
False
[Correct] Correct