wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Greenfoot GCSE

Total questions: 21

Worksheet time: 9mins

Name
Class
Date
1.

What is missing from this code?

a)

;

b)

(

c)

{

d)

:

2.

Classic error. How do you fix it?

a)

Add a { at the end

b)

Add a } at the end

c)

Control+shift+i to re-order the indentation

d)

Move it all into the act method

3.

Which operations are needed to remove an actor from the world? (In order)

a)
b)
c)
d)
4.

Which code is required to allow interaction with the actor and user?

a)
b)
c)
d)
5.

Which code will make an actor move randomly?

a)
b)
c)
d)
6.

How are comments made within Java Greenfoot? Pick 2:

a)

same as python, with #

b)

//

c)

*

d)

*//

7.

Which of these codes would allow an actor to move?

a)

move (1) ;

b)

move (1)

c)

move ();

d)

move ()

8.

I want to play a sound called pop.wav. What is the correct command?

a)
b)
c)
d)
9.

In the image, what are World and Actor both examples of?

a)

Superclass

b)

Subclass

c)

Parameter

d)

Private property

e)

Comment

10.

In the image, what are Ground and WaterTrap both examples of?

a)

Superclass

b)

Subclass

c)

Parameter

d)

Private property

e)

Comment

11.

Your program looks like this - what is wrong?

a)

You need to press the compile button

b)

Everything is broken

12.

Which answer increases the counter by 1?

a)
b)
c)
d)
13.
Greenfoot is an example of what type of programming?
a)
Procedural
b)
Object-Orientated
c)
Functional
d)
Declarative
14.
Name for the characters that live in the Greenfoot world's
a)
Actors
b)
Sprites
c)
Characters
d)
People
15.
To make an actor move just once you can click this button
a)
Run
b)
Act
c)
Play
d)
Move
16.
To make a game play you need to click this button
a)
Act
b)
Run
c)
Play
d)
Move
17.
Which of these would allow an actor to move with the arrow keys?
a)
Greenfoot.isKeyDown("left")
b)
Greenfootiskeydown(left)
c)
Greenfoot.ISKEYDOWN("LEFT")
d)
greenfoot.isKeyDown("left")
18.
Which of the following terms describes a group of objects with common properties?
a)
function
b)
event
c)
class
d)
parameter
19.

A method is...

a)

A way of calculating things in Java

b)

A strategy for programming

c)

A predefined set of instructions in a class

d)

A way to sore details in a class

20.

In the image, what is the text an example of?

a)

Superclass

b)

Subclass

c)

Parameter

d)

Private property

e)

Comment

21.

Which of the following is the correct way to implement an IF statement that detects if an object is touching another object?

a)

if(isTouching(example.class)) {


}

b)

(isTouching(example.class)) {


}

c)

if(isTouching(example.class)) [


]

d)

(isTouching()) {

example.class

}