You are on page 1of 12

1.

In
Mark for Review
Greenfoot,
(1) Points
the turn
method
expects
what type of
information
in its
parameters?

Parameter void

Integer of steps to move forward

True or false response

Degrees to turn (*)

String statement

Incorrect. Refer to Section 3 Lesson


2.

2. In the Greenfoot IDE, an instance's position is on the x and y


Mark for Review
coordinates. True or false?
(1) Points

True (*)

False

Correct

3. In Greenfoot, the instance has a source code editor. True or


Mark for Review
false?
(1) Points

True

False (*)
Incorrect. Refer to Section 3 Lesson
2.

4. Using the Greenfoot IDE, only five instances can be added to a


Mark for Review
scenario. True or false?
(1) Points

True

False (*)

Correct

5. The list below displays characteristics of a Greenfoot world


Mark for Review
constructor, except for one. Which one should be removed?
(1) Points

Has a void return type. (*)

Executed automatically when a new instance of the class is


created.

Has no return type.

Defines the instance's size and resolution.

Has the same name as the name of the class.

Incorrect. Refer to Section 3 Lesson


5.

6. In
Greenfoot, Mark for Review
you can (1) Points
use
comparison
operators
to compare
a variable
to a
random
number.
True or
false?

True (*)

False

Correct

7. An if-else statement executes its first code block if a condition is true, and
its second code block if a condition is false, but not both. True or false? Mark for Review
(1) Points

True (*)

False

Incorrect. Refer to Section 3 Lesson 5.

8. From your Greenfoot lessons, which of the following comparison operators


represents "greater than"? Mark for Review
(1) Points

==

> (*)

!=

<

Correct

9. From your Greenfoot lessons, where do you review a class's inherited


methods? Mark for Review
(1) Points

Act method

Documentation (*)

If-statement
Inspector

Incorrect. Refer to Section 3 Lesson 3.

10. 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

void return type

object return type

method return type


non-void return type (*)
Incorrect. Refer to Section 3 Lesson 3.

11. In
Greenfoot, Mark for Review
after a (1) Points
subclass is
created,
what has
to occur
before
instances
can be
added to
the
scenario?

Compilation (*)

Editing of source code

Creation of source code

Creation of an instance

Correct

12. In Greenfoot, the class holds the general attributes of an instance, such as
the methods it inherits. True or false? Mark for Review
(1) Points

True (*)

False

Incorrect. Refer to Section 3 Lesson 1.

13. 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

14. An object is an instance of a class. True or false?


Mark for Review
(1) Points

True (*)
False

Correct
15. From your Greenfoot lessons, how do you know the program does not
contain syntax errors? Mark for Review
(1) Points

Inspect the instances.

Review the documentation.

Compile the code. (*)

Write the code.

Correct

1. In
Greenfoot, Mark for Review
which of (1) Points
the
following
methods
display an
object's
orientation?

(Choose all correct answers)

void move()

int getX() (*)

void turn()

int getRotation() (*)

Correct

2. The list below displays components of the Greenfoot source code editor
except one. Which one should be removed? Mark for Review
(1) Points

Documentation

Class description

Comments

Method body

Instance creator (*)

Incorrect. Refer to Section 3 Lesson 3.

3. From your Greenfoot lessons, which of the following comparison operators


represents "greater than"? Mark for Review
(1) Points

==
> (*)

!=

<

Correct

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

5. The Greenfoot method getRandomNumber is used to create predictable


behaviour in your scenario Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 5.

6. Which of
the Mark for Review
following (1) Points
comparison
operators
represents
"greater
than or
equal"?

!=

==

>= (*)

>

Correct

7. An object is an instance of a class. True or false?


Mark for Review
(1) Points

True (*)

False
Correct

8. 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 rose is a subclass of the flower superclass. (*)

A dog is a subclass of the cat superclass.

Incorrect. Refer to Section 3 Lesson 1.

9. In Greenfoot, what happens to an instance when the Act button is clicked


in the environment? Mark for Review
(1) Points

The class executes all of the programming statements in their


instance's act method two times until the scenario is stopped.
The instance executes all of the programming statements in their
class's act method repeatedly 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 two times until the scenario is stopped.
The instance executes all of the programming statements in their
class's act method once. (*)

Correct

10. In Greenfoot, you must first create an instance before you create a class.
True or false? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 1.

11. When a
program Mark for Review
is tested (1) Points
once and
it works
then
testing is
complete.

True

False (*)

Incorrect. Refer to Section 3 Lesson 4.


12. An instance variable can be saved and accessed later, even if the instance
no longer exists. True or false? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 2.

13. A variable is also known as a ____________.


Mark for Review
(1) Points

Syntax

Method

Field (*)

Class

Instance

Incorrect. Refer to Section 3 Lesson 2.

14. In Greenfoot, the body of the method is located in between which of the
following characters? Mark for Review
(1) Points

Curly brackets { } (*)

Parnetheses ( )

Asterisks **

Square brackets [ ]

Correct

15. 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

1. In
Greenfoot, Mark for Review
which of (1) Points
the
following
is the
correct
notation
for calling
a method
for an
instance
of a class?

Method-name.object-name(parameters);

object-name.method-name(parameters); (*)

class-name.method-name(parameters);

Method-name.object-name;

Incorrect. Refer to Section 3 Lesson 5.

2. An if-else statement executes its first code block if a condition is true, and
its second code block if a condition is false, but not both. True or false? Mark for Review
(1) Points

True (*)

False

Correct

3. 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

4. In Greenfoot, a semicolon is not necessary at the end of a method that uses


dot notation. True or false? Mark for Review
(1) Points

True

False (*)

Incorrect. Refer to Section 3 Lesson 5.

5. In Greenfoot, only 10 methods can be written for each class in the Code
editor. True or false? Mark for Review
(1) Points

True

False (*)
Correct

6. In
Greenfoot, Mark for Review
which of (1) Points
the
following
methods
display an
object's
orientation?

(Choose all correct answers)

void turn()

int getX() (*)

int getRotation() (*)

void move()

Correct

7. An instance variable can be saved and accessed later, even if the instance
no longer exists. True or false? Mark for Review
(1) Points

True

False (*)

Correct

8. In Greenfoot, the instance has a source code editor. True or false?


Mark for Review
(1) Points

True

False (*)

Correct

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

Draw an image

Import an image

Add a video (*)


Correct

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 Mark for Review
the act method are executed. True or false? (1) Points

True (*)

False

Correct

11. From
your Mark for Review
Greenfoot (1) Points
lessons,
how do
you know
the
program
does not
contain
syntax
errors?

Inspect the instances.

Write the code.

Review the documentation.

Compile the code. (*)

Correct

12. Which of the following Java syntax is used to correctly create a Bee
subclass? Mark for Review
(1) Points

private class extends Bee

private Bee extends World

public class Bee extends World

private class extends Actor

public class Bee extends Animal (*)

Correct

13. 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

14. In Greenfoot, a subclass is a specialization of a superclass. True or false?


Mark for Review
(1) Points

True (*)

False

Correct

15. In Greenfoot to create a new instance of a class, you right-click on the


class, then select which of the following commands in the class menu? Mark for Review
(1) Points

Set image...

new Duke() (*)

Remove Duke()

Inspect Duke()

New subclass...

Incorrect. Refer to Section 3 Lesson 1.

You might also like