Sie sind auf Seite 1von 4

1.

An
object Mark for Review
is an (1) Points
instance
of a
class.
True or
false?
True (*)

False

Correct

2. 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
Inspect Duke()

New subclass...

new Duke() (*)

Set image...

Remove Duke()

Correct

3. Which of the following Java syntax is used to correctly create a Bee subclass?
Mark for Review
(1) Points
public class Bee extends World

private Bee extends World

public class Bee extends Animal (*)

private class extends Actor

private class extends Bee

Correct

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

5. 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
Degrees to turn (*)

String statement

True or false response

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

False (*)

Correct

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

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

True (*)

False

Correct

9. 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 and edit comments.

Write source code to tell the class how to act in the scenario.

Review the online Java Library documentation. (*)

Write and edit source code.

Correct
10. 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 (*)

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

Inspect the instances.

Review the documentation.

Write the code.

Correct

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

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

Correct
14. 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);

addWorld (new Bee( ), 120, 100);

addClass (new Bee( ), 120, 100);

addObject (new Bee( ), 120, 100); (*)

Incorrect. Refer to Section 3 Lesson 5.

15. From your Greenfoot lessons, when does an if-else statement execute it's second
code segment? Mark for Review
(1) Points
When an instance is created.

If a condition is false. (*)

If a condition is true.

After the first code segment is executed.

When a random number is less than 10.

Correct

Das könnte Ihnen auch gefallen