Green foot

studied byStudied by 2 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 15

flashcard set

Earn XP

16 Terms

1

Move via arrow key

If (Greenfoot.isKeyDown(“ ”)) {

setLocation( getX(), getY());

New cards
2

Turn when at edge

If (isAtEdge()) {

Turn(180);

Move(10);

}

New cards
3

Make an object move randomly

move(Greenfoot.getRandomNumber(10));

turn(Greenfoot.getRandomNumber(180) -90);

New cards
4

Eat

If (isTouching(car.class)) {

getWorld().removeObject(this);

}

New cards
5

Play sound

Greenfoot.playSound(“pop.wav”)

New cards
6

Stop

Greenfoot.stop();

New cards
7

Counter

Counter counter = (Counter)getWorld().getObjects(Counter.class) .get(0);

counter.add(1);

New cards
8

Sensible size for a word

(100, 100, 4)

New cards
9

What is an assignment

Giving something a value

New cards
10

What is a selection

if statement

New cards
11

Example of a superclass

  • World

  • Actor

New cards
12

Example of an inherited class.

World —> ground

New cards
13

What is a parameter

It is anything inside the bracket

New cards
14

What is method

Public void act

New cards
15

Example of a private property

counter (LOWER case ONLY)

New cards
16

Examplm of a parameter

Amount

New cards
robot