How do you fix this error?? this is my code
import greenfoot.*;
/**
* Write a description of class Rocket here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Rocket extends Actor
{
/**
* Act - do whatever the Rocket wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
if (Greenfoot. isKeyDown ("space"))
{
fire();
}
if (Greenfoot. isKeyDown ("W"))
{
move(3);
}
if (Greenfoot. isKeyDown ("S"))
{
move(-3);
}
if (Greenfoot. isKeyDown ("A"))
{
turn(-5);
}
if (Greenfoot. isKeyDown ("D"))
{
turn(5);
}
touch();
touching();
}
public void fire()
{
if (getWorld(). getObjects(Bullet.class).isEmpty())
{
Bullet bala = new Bullet();
getWorld().addObject (bala, getX(), getY());
bala.setRotation(getRotation());
bala.move(50);
}
}
public void touch()
{
if ( isTouching(Bullet2.class) )
{
getWorld().removeObject(this);
Greenfoot.stop();
return;
}
}
public void touching()
{
if ( isTouching(Bomb.class) )
{
getWorld().removeObject(this);
Greenfoot.stop();
return;
}
}
}
