1. 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
2. What does the following Greenfoot programming statement tell the class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); } Mark for Review
(1) Points
If a random number is returned that is greater than 6, turn 18 degrees.
If a random number is returned that is less than 6, move 18 steps.
If a random number is returned that is less than 6, turn 18 degrees. (*)
Turn 6 degrees, then turn 18 degrees.
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
3. From your Greenfoot lessons, what can methods belong to? Mark for Review
(1) Points
(Choose all correct answers)
Galleries
Classes (*)
Scenarios
Objects (*)
All of the above
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
4. 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
5. In Greenfoot, a subclass is a specialization of a superclass. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
6. What does an instance of the World class do? Mark for Review
(1) Points
Provide the superclass for acting objects.
Provide the background scenery for the scenario. (*)
Provide the acting objects for the scenario.
Provide the source code for instances.
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
7. In Greenfoot, what happens to an instance when the Act button is clicked in the environment? Mark for Review
(1) Points
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.
Only one instance moves until the pause button is clicked.
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 once. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
8. Which of the following are examples of default superclasses that are present in a new Greenfoot scenario? Mark for Review
(1) Points
(Choose all correct answers)
Actor (*)
World (*)
Cat
Dog
Parrot
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
9. 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
10. From your Greenfoot lessons, what are the ways that you can view a class's methods? Mark for Review
(1) Points
(Choose all correct answers)
In the scenario
In the class's documentation (*)
By right-clicking on an instance (*)
In the Greenfoot gallery
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
11. In Greenfoot, which of the following methods return the world that the instance lives in? Mark for Review
(1) Points
World getWorld() (*)
getRotation()
World getClass()
getXY()
[Correct] Correct
12. In Greenfoot, the instance has a source code editor. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
13. In Greenfoot, the turn method expects what type of information in its parameters? Mark for Review
(1) Points
Integer of steps to move forward
Parameter void
String statement
Degrees to turn (*)
True or false response
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
14. In Greenfoot, the move method expects what type of information in its parameters? Mark for Review
(1) Points
Degrees to turn
Integer of steps to move forward (*)
String statement
True or false response
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
15. In Greenfoot, which of the following options are not possible when associating an image file with an instance? Mark for Review
(1) Points
Add a video (*)
Draw an image
Select an image from the Greenfoot library
Import an image
[Correct] Correct
1. In Greenfoot, which method checks if a key on the keyboard has been pressed? Mark for Review
(1) Points
isKeyDown method (*)
keyClick method
keyPress method
isKeyUp method
[Correct] Correct
2. In Greenfoot, the sound file must be saved in the scenario and written in the source code for it to play. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
3. What type of parameter does the keyDown method expect? Mark for Review
(1) Points
The password that will protect the class.
The name of the class that will use the key.
The name of the sound file to play when the key is pressed.
The name of the key to press on the keyboard. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
4. In Greenfoot modifying an actors constructor to accept an initial speed is a form of abstraction? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
5. Writing more generic statements to handle the creation and positioning of many objects is one Abstraction technique? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
6. In Greenfoot, you can cast an Actor class to a World class? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 9.
7. Which operator is used to test if values are equal? Mark for Review
(1) Points
!>
>
<
== (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
8. In Greenfoot, which method is used to add a new instance to a scenario when the world is initialized? Mark for Review
(1) Points
addWorld
addInstance
addClass
addObject (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
9. Which keyword is used to add an actor to a Greenfoot world? Mark for Review
(1) Points
add
super
addObject (*)
new
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
10. In Greenfoot a collision is when 2 actors touch? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
11. A collision in Greenfoot is when two actors make contact? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
12. Which actor method is used to detect a simple collision? Mark for Review
(1) Points
hasCollided()
isCollision()
isTouching() (*)
isInContactWith()
hasTouched()
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
13. In Greenfoot, a local variable is declared at the beginning of a class. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
14. Use your Greenfoot knowledge: An array object holds a single variable. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
15. How would the following sentence be written in Greenfoot source code? If Bee is turning, and the keyboard key "d" is down... Mark for Review
(1) Points
if (!isTurning && Greenfoot.isKeyDown("d") )
if (!Greenfoot.isKeyDown && isTurning("d") )
if (&&isTurning ! Greenfoot.isKeyDown("d") )
if (isTurning && Greenfoot.isKeyDown("d") ) (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
1. From your Greenfoot lessons, which type of constructor can be used to automate creation of Actor instances? Mark for Review
(1) Points
World (*)
Animal
Actor
Vector
[Correct] Correct
2. The first step to executing an if-else statement is to:____________. Mark for Review
(1) Points
Evaluate the class
Evaluate the condition (*)
Execute the else statement
Execute the if statement
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
3. From your Greenfoot lessons, which programming statement creates a new Bee object, and places it at x = 120, y = 100 in the world? Mark for Review
(1) Points
Move(120,100);
addObject (new Bee( ), 120, 100); (*)
addWorld (new Bee( ), 120, 100);
addClass (new Bee( ), 120, 100);
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
4. In Greenfoot, which keyword calls the World superclass? Mark for Review
(1) Points
constructor
new
world
addObject
super (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
5. In Greenfoot, the instance has a source code editor. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
6. 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
7. In Greenfoot, the move method expects what type of information in its parameters? Mark for Review
(1) Points
Integer of steps to move forward (*)
String statement
True or false response
Degrees to turn
[Correct] Correct
8. In the Greenfoot IDE, an instance's position is on the x and y coordinates. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
9. From your Greenfoot lessons, how do you know the program does not contain syntax errors? Mark for Review
(1) Points
Write the code.
Compile the code. (*)
Inspect the instances.
Review the documentation.
[Incorrect] Incorrect. Refer to Section 3 Lesson 4.
10. In Greenfoot, which of the following methods display an object's orientation? Mark for Review
(1) Points
(Choose all correct answers)
void move()
int getX() (*)
void turn()
int getRotation() (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
11. In Greenfoot, a method with what kind of return type is used to learn more about an object's orientation? Mark for Review
(1) Points
method return type
non-void return type (*)
object return type
void return type
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
12. In Greenfoot, a subclass is a specialization of a superclass. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
13. An object is an instance of a class. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. Which of the following Java syntax is used to correctly create a Bee subclass? Mark for Review
(1) Points
public class Bee extends Animal (*)
private class extends Bee
private Bee extends World
public class Bee extends World
private class extends Actor
[Correct] Correct
15. What does an instance of the World class do? Mark for Review
(1) Points
Provide the acting objects for the scenario.
Provide the background scenery for the scenario. (*)
Provide the superclass for acting objects.
Provide the source code for instances.
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
1. Which class holds the method that ends a Greenfoot game? Mark for Review
(1) Points
Class
Greenfoot (*)
GreenfootImage
Actor
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
2. What does the following programming statement mean?
image1 = new GreenfootImage("duke12.png"); Mark for Review
(1) Points
The image file, duke12.png, has just been drawn and imported into the scenario.
The variable, image1, cannot use the image file, duke12.png.
The image file, duke12.png, is assigned to the variable image1. (*)
Image files from 1-119 are associated with image1.
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
3. In Greenfoot, a defined variable is a variable that is defined in an instance. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
4. Which of the following is not a component of a while loop? Mark for Review
(1) Points
Control operator
if statement (*)
while keyword
Local variable
Loop variable
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
5. 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
6. In Greenfoot, string concatenation reduces the number of redundant characters or phrases you need to type into each array. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
7. In Greenfoot, a way to have all subclasses of a superclass inherit a method is by adding the method to the superclass. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
8. Which one of the following can be used to detect when 2 actors collide? Mark for Review
(1) Points
isContact()
isCollision()
isTouching() (*)
hasCollided()
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
9. Defined methods are methods that are only created by the Greenfoot development team? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
10. Use your Greenfoot knowldege: Abstraction occurs in many different ways in programming. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
11. Abstraction occurs in many different ways in programming. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
12. Use your Greenfoot knowldege: If an Actor class Fly has a variable defined to store the current speed, which of the following statements would successfully add a Fly and define the current speed as 2? Mark for Review
(1) Points
addObject (new Fly(2, 90), 150, 150);
addObject (new Fly(), 150, 150);
addObject (new Fly(), 2, 150, 150);
addObject (new Fly(2), 150, 150); (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 9.
13. In Greenfoot when you use the method to retrieve input from the user, the scenario will continue to run in the background? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
14. In Greenfoot, the sound file must be saved in the scenario and written in the source code for it to play. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
15. In Greenfoot, you can only interact with the scenario using a keyboard. Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
1. In Greenfoot, which of the following options are not possible when associating an image file with an instance? Mark for Review
(1) Points
Draw an image
Import an image
Select an image from the Greenfoot library
Add a video (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
2. In Greenfoot, the move method expects what type of information in its parameters? Mark for Review
(1) Points
True or false response
Degrees to turn
String statement
Integer of steps to move forward (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
3. In Greenfoot, the body of the method is located in between which of the following characters? Mark for Review
(1) Points
Curly brackets { } (*)
Asterisks **
Square brackets [ ]
Parnetheses ( )
[Correct] Correct
4. In Greenfoot, the turn method expects what type of information in its parameters? Mark for Review
(1) Points
String statement
Integer of steps to move forward
True or false response
Degrees to turn (*)
Parameter void
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
5. An if-statement requires which type of information returned from the condition? Mark for Review
(1) Points
Integer
Method
Action
True or false (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
6. From your Greenfoot lessons, in an if-statement, the programming statements written in curly brackets are executed simultaneously. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
7. In Greenfoot, after a subclass is created and compiled, you cannot edit the subclass's source code. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
8. In Greenfoot, the Run button repeatedly executes all of the programming statements in the class's act method in sequential order until the pause button is clicked. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
9. In Greenfoot, you must first create an instance before you create a class. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
10. Which of the following demonstrates a Greenfoot subclass/superclass relationship? Mark for Review
(1) Points
A computer is a subclass of a video game superclass.
A single person is a superclass of the human subclass.
A dog is a subclass of the cat superclass.
A rose is a subclass of the flower superclass. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
11. Which of the following features of Greenfoot will locate syntax errors in your program? Mark for Review
(1) Points
Instance creation
Compilation (*)
Documentation
Code editor
[Incorrect] Incorrect. Refer to Section 3 Lesson 4.
12. Read the following method signature. Using your Greenfoot experience, what does this method do?
public static int getRandomNumber (int limit) Mark for Review
(1) Points
Returns a random number between zero and the parameter limit. (*)
Returns a random number for instances in the animal class only.
Returns a random coordinate position in the world.
Returns a random number less than 10.
[Correct] Correct
13. What does the following Greenfoot programming statement tell the class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); } Mark for Review
(1) Points
Turn 6 degrees, then turn 18 degrees.
If a random number is returned that is greater than 6, turn 18 degrees.
If a random number is returned that is less than 6, move 18 steps.
If a random number is returned that is less than 6, turn 18 degrees. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
14. Which keyword indicates that Greenfoot needs to create a new object? Mark for Review
(1) Points
newClass
new (*)
newObject
addObject
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
15. From your Greenfoot lessons, what can methods belong to? Mark for Review
(1) Points
(Choose all correct answers)
Galleries
Classes (*)
Scenarios
Objects (*)
All of the above
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
1. What type of parameter does the Greenfoot playSound method expect? Mark for Review
(1) Points
name of the class (as String)
name of a keyboard key (as String)
name of a sound file (as String) (*)
name of an integer (as int)
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
2. In Greenfoot, which method checks if a key on the keyboard has been pressed? Mark for Review
(1) Points
keyClick method
isKeyDown method (*)
keyPress method
isKeyUp method
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
3. In Greenfoot, what type of parameter does the isKeyDown method expect? Mark for Review
(1) Points
String (*)
Method
Integer
Boolean
[Correct] Correct
4. In the following Greenfoot array, what statement would you write to access the "a" key?
Keynames = {"a", "b", "c", "d"}; Mark for Review
(1) Points
keynames["a" key]
keynames["a"]
keynames[0] (*)
keynames[2]
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
5. In Greenfoot, arrays are a way to hold and access multiple variables, and assign different values to new instances each time the while loop executes and produces a new instance. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
6. If an end to a while loop is not established, what happens? Mark for Review
(1) Points
The code stops after 20 executions.
The code stops after 10 executions.
The code executes and does not stop. (*)
The condition becomes false after one minute of executions.
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
7. Which of the following answers have the correct syntax for declaring a class variable in Greenfoot? Mark for Review
(1) Points
(Choose all correct answers)
public variable-type variable-name; (*)
public variable-name variable type;
private variable-name, variable-type;
private variable-type variable-name; (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
8. In Greenfoot the showText() method belongs to which class? Mark for Review
(1) Points
World (*)
Greenfoot
Actor
There is no such method.
[Correct] Correct
9. In Greenfoot, a constructor has a void return type. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
10. In Greenfoot, which of the following statement is true about Defined Methods? Mark for Review
(1) Points
A defined method must be called by your source code, normally in the Act method. (*)
A defined method is only relevant to the Greenfoot Development team.
A defined method is automatically executed once created.
A defined method only relates to the World class.
[Correct] Correct
11. In Greenfoot, defined methods must be used immediately. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
12. 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
World method
Defined method (*)
Instance method
Class method
Code method
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
13. Use your Greenfoot knowldege: Abstraction occurs in many different ways in programming. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. In Greenfoot modifying an actors constructor to accept an initial speed is a form of abstraction? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
15. In Java what is casting? Mark for Review
(1) Points
Casting is when we reset the state of an instance.
Casting is when we want to tell the java compiler that a class we are accessing is really another type of class (*)
Casting is when we remove an object from the world
Casting is when we change the coordinates of an actor
[Incorrect] Incorrect. Refer to Section 3 Lesson 9.
1. 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
2. Which of the following comparison operators represents "greater than or equal"? Mark for Review
(1) Points
>= (*)
>
! =
= =
[Correct] Correct
3. What does the following Greenfoot programming statement tell the class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); } Mark for Review
(1) Points
Turn 6 degrees, then turn 18 degrees.
If a random number is returned that is greater than 6, turn 18 degrees.
If a random number is returned that is less than 6, move 18 steps.
If a random number is returned that is less than 6, turn 18 degrees. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
4. The first step to executing an if-else statement is to:____________. Mark for Review
(1) Points
Evaluate the condition (*)
Execute the else statement
Evaluate the class
Execute the if statement
[Correct] Correct
5. In Greenfoot, a subclass is a specialization of a superclass. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
6. What does an instance of the World class do? Mark for Review
(1) Points
Provide the source code for instances.
Provide the acting objects for the scenario.
Provide the background scenery for the scenario. (*)
Provide the superclass for acting objects.
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
7. Which of the following are examples of default superclasses that are present in a new Greenfoot scenario? Mark for Review
(1) Points
(Choose all correct answers)
World (*)
Dog
Parrot
Cat
Actor (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
8. In Greenfoot, which of the following are execution controls? Mark for Review
(1) Points
(Choose all correct answers)
Speed (*)
Move
Run (*)
Turn
Act (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
9. When a program is tested once and it works then testing is complete. Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 4.
10. In Greenfoot, the turn method expects what type of information in its parameters? Mark for Review
(1) Points
Degrees to turn (*)
String statement
Parameter void
True or false response
Integer of steps to move forward
[Correct] Correct
11. A variable is also known as a ____________. Mark for Review
(1) Points
Syntax
Class
Method
Field (*)
Instance
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
12. In Greenfoot, which of the following options are not possible when associating an image file with an instance? Mark for Review
(1) Points
Select an image from the Greenfoot library
Import an image
Draw an image
Add a video (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
13. In the Greenfoot IDE, an instance's position is on the x and y coordinates. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. In a Greenfoot if-statement, the programming statements that the if-statement executes are written in curly brackets. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
15. In Greenfoot, which of the following methods display an object's orientation? Mark for Review
(1) Points
(Choose all correct answers)
void turn()
void move()
int getRotation() (*)
int getX() (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
(1) Points
True (*)
False
[Correct] Correct
2. What does the following Greenfoot programming statement tell the class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); } Mark for Review
(1) Points
If a random number is returned that is greater than 6, turn 18 degrees.
If a random number is returned that is less than 6, move 18 steps.
If a random number is returned that is less than 6, turn 18 degrees. (*)
Turn 6 degrees, then turn 18 degrees.
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
3. From your Greenfoot lessons, what can methods belong to? Mark for Review
(1) Points
(Choose all correct answers)
Galleries
Classes (*)
Scenarios
Objects (*)
All of the above
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
4. 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
5. In Greenfoot, a subclass is a specialization of a superclass. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
6. What does an instance of the World class do? Mark for Review
(1) Points
Provide the superclass for acting objects.
Provide the background scenery for the scenario. (*)
Provide the acting objects for the scenario.
Provide the source code for instances.
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
7. In Greenfoot, what happens to an instance when the Act button is clicked in the environment? Mark for Review
(1) Points
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.
Only one instance moves until the pause button is clicked.
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 once. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
8. Which of the following are examples of default superclasses that are present in a new Greenfoot scenario? Mark for Review
(1) Points
(Choose all correct answers)
Actor (*)
World (*)
Cat
Dog
Parrot
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
9. 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
10. From your Greenfoot lessons, what are the ways that you can view a class's methods? Mark for Review
(1) Points
(Choose all correct answers)
In the scenario
In the class's documentation (*)
By right-clicking on an instance (*)
In the Greenfoot gallery
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
11. In Greenfoot, which of the following methods return the world that the instance lives in? Mark for Review
(1) Points
World getWorld() (*)
getRotation()
World getClass()
getXY()
[Correct] Correct
12. In Greenfoot, the instance has a source code editor. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
13. In Greenfoot, the turn method expects what type of information in its parameters? Mark for Review
(1) Points
Integer of steps to move forward
Parameter void
String statement
Degrees to turn (*)
True or false response
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
14. In Greenfoot, the move method expects what type of information in its parameters? Mark for Review
(1) Points
Degrees to turn
Integer of steps to move forward (*)
String statement
True or false response
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
15. In Greenfoot, which of the following options are not possible when associating an image file with an instance? Mark for Review
(1) Points
Add a video (*)
Draw an image
Select an image from the Greenfoot library
Import an image
[Correct] Correct
1. In Greenfoot, which method checks if a key on the keyboard has been pressed? Mark for Review
(1) Points
isKeyDown method (*)
keyClick method
keyPress method
isKeyUp method
[Correct] Correct
2. In Greenfoot, the sound file must be saved in the scenario and written in the source code for it to play. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
3. What type of parameter does the keyDown method expect? Mark for Review
(1) Points
The password that will protect the class.
The name of the class that will use the key.
The name of the sound file to play when the key is pressed.
The name of the key to press on the keyboard. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
4. In Greenfoot modifying an actors constructor to accept an initial speed is a form of abstraction? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
5. Writing more generic statements to handle the creation and positioning of many objects is one Abstraction technique? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
6. In Greenfoot, you can cast an Actor class to a World class? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 9.
7. Which operator is used to test if values are equal? Mark for Review
(1) Points
!>
>
<
== (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
8. In Greenfoot, which method is used to add a new instance to a scenario when the world is initialized? Mark for Review
(1) Points
addWorld
addInstance
addClass
addObject (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
9. Which keyword is used to add an actor to a Greenfoot world? Mark for Review
(1) Points
add
super
addObject (*)
new
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
10. In Greenfoot a collision is when 2 actors touch? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
11. A collision in Greenfoot is when two actors make contact? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
12. Which actor method is used to detect a simple collision? Mark for Review
(1) Points
hasCollided()
isCollision()
isTouching() (*)
isInContactWith()
hasTouched()
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
13. In Greenfoot, a local variable is declared at the beginning of a class. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
14. Use your Greenfoot knowledge: An array object holds a single variable. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
15. How would the following sentence be written in Greenfoot source code? If Bee is turning, and the keyboard key "d" is down... Mark for Review
(1) Points
if (!isTurning && Greenfoot.isKeyDown("d") )
if (!Greenfoot.isKeyDown && isTurning("d") )
if (&&isTurning ! Greenfoot.isKeyDown("d") )
if (isTurning && Greenfoot.isKeyDown("d") ) (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
1. From your Greenfoot lessons, which type of constructor can be used to automate creation of Actor instances? Mark for Review
(1) Points
World (*)
Animal
Actor
Vector
[Correct] Correct
2. The first step to executing an if-else statement is to:____________. Mark for Review
(1) Points
Evaluate the class
Evaluate the condition (*)
Execute the else statement
Execute the if statement
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
3. From your Greenfoot lessons, which programming statement creates a new Bee object, and places it at x = 120, y = 100 in the world? Mark for Review
(1) Points
Move(120,100);
addObject (new Bee( ), 120, 100); (*)
addWorld (new Bee( ), 120, 100);
addClass (new Bee( ), 120, 100);
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
4. In Greenfoot, which keyword calls the World superclass? Mark for Review
(1) Points
constructor
new
world
addObject
super (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
5. In Greenfoot, the instance has a source code editor. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
6. 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
7. In Greenfoot, the move method expects what type of information in its parameters? Mark for Review
(1) Points
Integer of steps to move forward (*)
String statement
True or false response
Degrees to turn
[Correct] Correct
8. In the Greenfoot IDE, an instance's position is on the x and y coordinates. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
9. From your Greenfoot lessons, how do you know the program does not contain syntax errors? Mark for Review
(1) Points
Write the code.
Compile the code. (*)
Inspect the instances.
Review the documentation.
[Incorrect] Incorrect. Refer to Section 3 Lesson 4.
10. In Greenfoot, which of the following methods display an object's orientation? Mark for Review
(1) Points
(Choose all correct answers)
void move()
int getX() (*)
void turn()
int getRotation() (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
11. In Greenfoot, a method with what kind of return type is used to learn more about an object's orientation? Mark for Review
(1) Points
method return type
non-void return type (*)
object return type
void return type
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
12. In Greenfoot, a subclass is a specialization of a superclass. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
13. An object is an instance of a class. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. Which of the following Java syntax is used to correctly create a Bee subclass? Mark for Review
(1) Points
public class Bee extends Animal (*)
private class extends Bee
private Bee extends World
public class Bee extends World
private class extends Actor
[Correct] Correct
15. What does an instance of the World class do? Mark for Review
(1) Points
Provide the acting objects for the scenario.
Provide the background scenery for the scenario. (*)
Provide the superclass for acting objects.
Provide the source code for instances.
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
1. Which class holds the method that ends a Greenfoot game? Mark for Review
(1) Points
Class
Greenfoot (*)
GreenfootImage
Actor
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
2. What does the following programming statement mean?
image1 = new GreenfootImage("duke12.png"); Mark for Review
(1) Points
The image file, duke12.png, has just been drawn and imported into the scenario.
The variable, image1, cannot use the image file, duke12.png.
The image file, duke12.png, is assigned to the variable image1. (*)
Image files from 1-119 are associated with image1.
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
3. In Greenfoot, a defined variable is a variable that is defined in an instance. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
4. Which of the following is not a component of a while loop? Mark for Review
(1) Points
Control operator
if statement (*)
while keyword
Local variable
Loop variable
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
5. 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
6. In Greenfoot, string concatenation reduces the number of redundant characters or phrases you need to type into each array. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
7. In Greenfoot, a way to have all subclasses of a superclass inherit a method is by adding the method to the superclass. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
8. Which one of the following can be used to detect when 2 actors collide? Mark for Review
(1) Points
isContact()
isCollision()
isTouching() (*)
hasCollided()
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
9. Defined methods are methods that are only created by the Greenfoot development team? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
10. Use your Greenfoot knowldege: Abstraction occurs in many different ways in programming. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
11. Abstraction occurs in many different ways in programming. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
12. Use your Greenfoot knowldege: If an Actor class Fly has a variable defined to store the current speed, which of the following statements would successfully add a Fly and define the current speed as 2? Mark for Review
(1) Points
addObject (new Fly(2, 90), 150, 150);
addObject (new Fly(), 150, 150);
addObject (new Fly(), 2, 150, 150);
addObject (new Fly(2), 150, 150); (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 9.
13. In Greenfoot when you use the method to retrieve input from the user, the scenario will continue to run in the background? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
14. In Greenfoot, the sound file must be saved in the scenario and written in the source code for it to play. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
15. In Greenfoot, you can only interact with the scenario using a keyboard. Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
1. In Greenfoot, which of the following options are not possible when associating an image file with an instance? Mark for Review
(1) Points
Draw an image
Import an image
Select an image from the Greenfoot library
Add a video (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
2. In Greenfoot, the move method expects what type of information in its parameters? Mark for Review
(1) Points
True or false response
Degrees to turn
String statement
Integer of steps to move forward (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
3. In Greenfoot, the body of the method is located in between which of the following characters? Mark for Review
(1) Points
Curly brackets { } (*)
Asterisks **
Square brackets [ ]
Parnetheses ( )
[Correct] Correct
4. In Greenfoot, the turn method expects what type of information in its parameters? Mark for Review
(1) Points
String statement
Integer of steps to move forward
True or false response
Degrees to turn (*)
Parameter void
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
5. An if-statement requires which type of information returned from the condition? Mark for Review
(1) Points
Integer
Method
Action
True or false (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
6. From your Greenfoot lessons, in an if-statement, the programming statements written in curly brackets are executed simultaneously. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
7. In Greenfoot, after a subclass is created and compiled, you cannot edit the subclass's source code. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
8. In Greenfoot, the Run button repeatedly executes all of the programming statements in the class's act method in sequential order until the pause button is clicked. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
9. In Greenfoot, you must first create an instance before you create a class. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
10. Which of the following demonstrates a Greenfoot subclass/superclass relationship? Mark for Review
(1) Points
A computer is a subclass of a video game superclass.
A single person is a superclass of the human subclass.
A dog is a subclass of the cat superclass.
A rose is a subclass of the flower superclass. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
11. Which of the following features of Greenfoot will locate syntax errors in your program? Mark for Review
(1) Points
Instance creation
Compilation (*)
Documentation
Code editor
[Incorrect] Incorrect. Refer to Section 3 Lesson 4.
12. Read the following method signature. Using your Greenfoot experience, what does this method do?
public static int getRandomNumber (int limit) Mark for Review
(1) Points
Returns a random number between zero and the parameter limit. (*)
Returns a random number for instances in the animal class only.
Returns a random coordinate position in the world.
Returns a random number less than 10.
[Correct] Correct
13. What does the following Greenfoot programming statement tell the class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); } Mark for Review
(1) Points
Turn 6 degrees, then turn 18 degrees.
If a random number is returned that is greater than 6, turn 18 degrees.
If a random number is returned that is less than 6, move 18 steps.
If a random number is returned that is less than 6, turn 18 degrees. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
14. Which keyword indicates that Greenfoot needs to create a new object? Mark for Review
(1) Points
newClass
new (*)
newObject
addObject
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
15. From your Greenfoot lessons, what can methods belong to? Mark for Review
(1) Points
(Choose all correct answers)
Galleries
Classes (*)
Scenarios
Objects (*)
All of the above
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
1. What type of parameter does the Greenfoot playSound method expect? Mark for Review
(1) Points
name of the class (as String)
name of a keyboard key (as String)
name of a sound file (as String) (*)
name of an integer (as int)
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
2. In Greenfoot, which method checks if a key on the keyboard has been pressed? Mark for Review
(1) Points
keyClick method
isKeyDown method (*)
keyPress method
isKeyUp method
[Incorrect] Incorrect. Refer to Section 3 Lesson 7.
3. In Greenfoot, what type of parameter does the isKeyDown method expect? Mark for Review
(1) Points
String (*)
Method
Integer
Boolean
[Correct] Correct
4. In the following Greenfoot array, what statement would you write to access the "a" key?
Keynames = {"a", "b", "c", "d"}; Mark for Review
(1) Points
keynames["a" key]
keynames["a"]
keynames[0] (*)
keynames[2]
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
5. In Greenfoot, arrays are a way to hold and access multiple variables, and assign different values to new instances each time the while loop executes and produces a new instance. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
6. If an end to a while loop is not established, what happens? Mark for Review
(1) Points
The code stops after 20 executions.
The code stops after 10 executions.
The code executes and does not stop. (*)
The condition becomes false after one minute of executions.
[Incorrect] Incorrect. Refer to Section 3 Lesson 10.
7. Which of the following answers have the correct syntax for declaring a class variable in Greenfoot? Mark for Review
(1) Points
(Choose all correct answers)
public variable-type variable-name; (*)
public variable-name variable type;
private variable-name, variable-type;
private variable-type variable-name; (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
8. In Greenfoot the showText() method belongs to which class? Mark for Review
(1) Points
World (*)
Greenfoot
Actor
There is no such method.
[Correct] Correct
9. In Greenfoot, a constructor has a void return type. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 8.
10. In Greenfoot, which of the following statement is true about Defined Methods? Mark for Review
(1) Points
A defined method must be called by your source code, normally in the Act method. (*)
A defined method is only relevant to the Greenfoot Development team.
A defined method is automatically executed once created.
A defined method only relates to the World class.
[Correct] Correct
11. In Greenfoot, defined methods must be used immediately. True or false? Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
12. 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
World method
Defined method (*)
Instance method
Class method
Code method
[Incorrect] Incorrect. Refer to Section 3 Lesson 6.
13. Use your Greenfoot knowldege: Abstraction occurs in many different ways in programming. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. In Greenfoot modifying an actors constructor to accept an initial speed is a form of abstraction? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
15. In Java what is casting? Mark for Review
(1) Points
Casting is when we reset the state of an instance.
Casting is when we want to tell the java compiler that a class we are accessing is really another type of class (*)
Casting is when we remove an object from the world
Casting is when we change the coordinates of an actor
[Incorrect] Incorrect. Refer to Section 3 Lesson 9.
1. 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
2. Which of the following comparison operators represents "greater than or equal"? Mark for Review
(1) Points
>= (*)
>
! =
= =
[Correct] Correct
3. What does the following Greenfoot programming statement tell the class to do?
if (Greenfoot.getRandomNumber(100) < 6) { turn(18); } Mark for Review
(1) Points
Turn 6 degrees, then turn 18 degrees.
If a random number is returned that is greater than 6, turn 18 degrees.
If a random number is returned that is less than 6, move 18 steps.
If a random number is returned that is less than 6, turn 18 degrees. (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 5.
4. The first step to executing an if-else statement is to:____________. Mark for Review
(1) Points
Evaluate the condition (*)
Execute the else statement
Evaluate the class
Execute the if statement
[Correct] Correct
5. In Greenfoot, a subclass is a specialization of a superclass. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
6. What does an instance of the World class do? Mark for Review
(1) Points
Provide the source code for instances.
Provide the acting objects for the scenario.
Provide the background scenery for the scenario. (*)
Provide the superclass for acting objects.
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
7. Which of the following are examples of default superclasses that are present in a new Greenfoot scenario? Mark for Review
(1) Points
(Choose all correct answers)
World (*)
Dog
Parrot
Cat
Actor (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
8. In Greenfoot, which of the following are execution controls? Mark for Review
(1) Points
(Choose all correct answers)
Speed (*)
Move
Run (*)
Turn
Act (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 1.
9. When a program is tested once and it works then testing is complete. Mark for Review
(1) Points
True
False (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 4.
10. In Greenfoot, the turn method expects what type of information in its parameters? Mark for Review
(1) Points
Degrees to turn (*)
String statement
Parameter void
True or false response
Integer of steps to move forward
[Correct] Correct
11. A variable is also known as a ____________. Mark for Review
(1) Points
Syntax
Class
Method
Field (*)
Instance
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
12. In Greenfoot, which of the following options are not possible when associating an image file with an instance? Mark for Review
(1) Points
Select an image from the Greenfoot library
Import an image
Draw an image
Add a video (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 2.
13. In the Greenfoot IDE, an instance's position is on the x and y coordinates. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
14. In a Greenfoot if-statement, the programming statements that the if-statement executes are written in curly brackets. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
15. In Greenfoot, which of the following methods display an object's orientation? Mark for Review
(1) Points
(Choose all correct answers)
void turn()
void move()
int getRotation() (*)
int getX() (*)
[Incorrect] Incorrect. Refer to Section 3 Lesson 3.
1 komentar so far
V7
EmoticonEmoticon