Soal Greenfoot PDF
Soal Greenfoot PDF
1.In Greenfoot, which of the following methods return the world that
Mark for Review
the instance lives in?
(1) Points
getRotation()
World getClass()
World getWorld() (*)
getXY()
Correct
Method body
Comments
Instance creator (*)
Documentation
Class description
3.Which of the following type of audience should you ask to play your
Mark for Review
Greenfoot game during the testing phase?
(1) Points
Testing
Primary
Programmer
Target (*)
True (*)
False
Correct
True (*)
False
Correct
True (*)
False
Correct
True
False (*)
8. In Greenfoot, methods can be called in the act method. When the Act
Mark for Review
button is clicked in the environment, the methods in the method body
(1) Points
of the act method are executed. True or false?
True (*)
False
Correct
Correct
Parnetheses ( )
Curly brackets { } (*)
Square brackets [ ]
Asterisks **
11.In Greenfoot, the turn method expects what type of information in its
Mark for Review
parameters?
(1) Points
Correct
= = (*)
<
!=
>
Correct
13.The Greenfoot method getRandomNumber is used to create
Mark for Review
predictable behaviour in your scenario
(1) Points
True
False (*)
Correct
Galleries
Classes (*)
Scenarios
Objects (*)
All of the above
1.In Greenfoot what command would you use to detect if a mouse has
Mark for Review
been clicked on an actor?
(1) Points
Greenfoot.clicked(this)
Actor.clicked(this)
Greenfoot.mouseClicked(this) (*)
Greenfoot.pressed(this)
Correct
2.In Greenfoot, the sound file must be saved in the scenario and written
Mark for Review
in the source code for it to play. True or false?
(1) Points
True (*)
False
Correct
True (*)
False
Correct
isTouching() (*)
hasCollided()
hasTouched()
isCollision()
isInContactWith()
Correct
5.Defined methods are methods that are only created by the Greenfoot
Mark for Review
development team?
(1) Points
True
False (*)
Correct
Section 3 Quiz 2 - L6-L10
(Answer all questions in this section)
True (*)
False
Correct
Correct
Correct
super(300,300,2); (*)
Super(300,300,2);
world(300, 300, 2);
super(2,300,300);
Correct
11.In Greenfoot, the == operator is used to test if two values are equal.
Mark for Review
True or false?
(1) Points
True (*)
False
Correct
Duke.stop( );
Game.stop(1);
Greenfoot.stop( ); (*)
Class.stop( );
Correct
Correct
True
False (*)
15.In the following Greenfoot array, what statement would you write to
Mark for Review
access the "a" key?
(1) Points
Keynames = {"a", "b", "c", "d"};
keynames["a"]
keynames[0] (*)
keynames[2]
keynames["a" key]
Documentation
Code editor
Compilation (*)
Instance creation
Correct
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, which of the following options are not possible when
Mark for Review
associating an image file with an instance?
(1) Points
Import an image
Select an image from the Greenfoot library
Add a video (*)
Draw an image
Correct
Parnetheses ( )
Curly brackets { } (*)
Asterisks **
Square brackets [ ]
Correct
Syntax
Instance
Class
Field (*)
Method
6. From your Greenfoot lessons, what are the ways that you can view a
Mark for Review
class's methods?
(1) Points
Correct
Method body
Instance creator (*)
Comments
Documentation
Class description
Correct
True (*)
False
Correct
Correct
Cat
Parrot
World (*)
Dog
Actor (*)
!=
<
>
= = (*)
Correct
True (*)
False
>
!=
==
>= (*)
Correct
True
False (*)
Correct