Beruflich Dokumente
Kultur Dokumente
1. From your Greenfoot lessons, which of the following are examples of when abstraction Mark for Review
techniques are used? (1) Points
Correct
2. Abstraction occurs in many different ways in programming. True or false? Mark for Review
(1) Points
True (*)
False
Correct
Section 1
(Answer all questions in this section)
1. From your Greenfoot lessons, which of the following are examples of actions that can be Mark for Review
achieved using the while loop? (1) Points
Correct
2. Which of the following is not a component of a while loop? Mark for Review
(1) Points
Local variable
Control operator
Loop variable
if statement (*)
while keyword
3. If an end to a while loop is not established, what happens? Mark for Review
(1) Points
Correct
4. Infinite loops are a common cause of errors in programming. True or false? Mark for Review
(1) Points
True (*)
False
Correct
5. An array is an object that holds multiple methods. True or false? Mark for Review
(1) Points
True
False (*)
6. In Greenfoot, arrays are a way to hold and access multiple variables, and assign different Mark for Review
values to new instances each time the while loop executes and produces a new instance. (1) Points
True or false?
True (*)
False
Correct
7. Which of the following Greenfoot logic operators represents "not"? Mark for Review
(1) Points
&
&&
=
! (*)
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.
Compares two boolean variables or expressions and returns a result that is true if either
of its operands are true.
Correct
9. In Greenfoot, a local variable is declared at the beginning of a class. True or false? Mark for Review
(1) Points
True
False (*)
10. In Greenfoot, what types of values cannot be stored in a local variable? Mark for Review
(1) Points
Class name
Objects
Integers
World name
Method (*)
11. In Greenfoot, string concatenation reduces the number of redundant characters or phrases Mark for Review
you need to type into each array. True or false? (1) Points
True (*)
False
Correct
12. Which of the following is an example of string concatenation? Mark for Review
(1) Points
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.
Section 1
(Answer all questions in this section)
1. In Greenfoot, the sound file must be saved in the scenario and written in the source code for Mark for Review
it to play. True or false? (1) Points
True (*)
False
Correct
2. You cannot record unique sounds in Greenfoot. You can only use the sounds that are stored Mark for Review
in the Greenfoot library. True or false? (1) Points
True
False (*)
3. What type of parameter does the keyDown method expect? Mark for Review
(1) Points
The password that will protect the class.
The name of the key to press on the keyboard. (*)
The name of the class that will use the key.
The name of the sound file to play when the key is pressed.
Section 1
(Answer all questions in this section)
1. In Greenfoot, the sound file must be saved in the scenario and written in the source code for Mark for Review
it to play. True or false? (1) Points
True (*)
False
Correct
2. You cannot record unique sounds in Greenfoot. You can only use the sounds that are stored Mark for Review
in the Greenfoot library. True or false? (1) Points
True
False (*)
3. What type of parameter does the keyDown method expect? Mark for Review
(1) Points
1.In the Greenfoot IDE, any new methods you create are written in the Mark for Review
class's source code, below the act method. True or false?
True (*)
False
Correct
public void
lookForEdge()
{
...
}
all subclasses
of the
superclass will
inherit the
method.
True or false?
True (*)
False
Correct
Quiz 8
Section 1
(Answer all questions in this section)
1. In Greenfoot, which method body correctly adds an instance of the Mark for Review
World to a scenario, with size x = 300 y = 300 and a resolution of 2 (1) Points
pixels per cell?
Correct
True
False (*)
Correct
3. Which of the following Greenfoot programming statements creates Mark for Review
a new instance of Duke, and places him at x = 140, y = 130 in the (1) Points
world?
Correct
4. Which keyword is used to add an actor to a Greenfoot world? Mark for Review
(1) Points
addObject
add
new (*)
super
Correct
5. Which of the following is the correct syntax for declaring a variable Mark for Review
in Greenfoot? (1) Points
Correct
6. In Greenfoot, what is the purpose of the variable type? Mark for Review
(1) Points
Correct
7. Which operator is used to test if values are equal? Mark for Review
(1) Points
<
== (*)
>
!>
Correct
8. In Greenfoot, the == operator is used to test if two values are equal. Mark for Review
True or false? (1) Points
True (*)
False
Correct
9. The GreenfootImage class enables Greenfoot actors to maintain Mark for Review
their visible image by holding an object of type GreenfootImage. (1) Points
True or false?
True (*)
False
Correct
10.What does the following programming statement mean? Mark for Review
(1) Points
image1 = new GreenfootImage("duke12.png );
Correct
11.In Greenfoot, which method is used to end a game? Mark for Review
(1) Points
Class.stop( );
Greenfoot.stop( ); (*)
Duke.stop( );
Game.stop(1);
Correct
12.Where can we review the available classes and methods in Mark for Review
Greenfoot, including the stop method? (1) Points
Class menu
Object menu
Class Application Programmers' Interface (API)
Greenfoot Application Programmers' Interface (API) (*)
Correct