Java在JCreator中找不到符号becker.robots

时间:2014-10-25 05:44:37

标签: java jcreator

所以我创建了一个类和另一个但是当我尝试编译它时找不到符号。我正在使用JCreator,但我不确定为什么第一堂课不会使用第二堂课。我之前有这个问题请帮忙。 这是我的代码:

*我上课

import becker.robots.*;


public class SpiderBot extends RobotSE
{


//SpiderBot class is created.
public SpiderBot(City aCity, int aStr, int anAve, Direction aDir)
{ super(aCity, aStr, anAve, aDir);
}

//Method to climb building.
public void climbBuilding()
{ this.turnLeft();
  this.move();
  this.move();
  this.move();
  this.move();
  this.move();
  this.turnRight();
  this.move();
}

//Method to climb down building.
public void climbDownBuilding()
{ this.move();
  this.turnRight();
  this.move();
  this.move();
  this.move();
  this.move();
  this.move();
  this.turnAround();

}
}

*second class I made that uses the first class.

import becker.robots.*;

public class Main
{
 public static void main(String[] args)
 {
  //Creating the city and the SpiderBot.
  City NewYork = new City("NewYork.txt");//This is the file that builds the city.
  SpiderBot karel = new SpiderBot(NewYork, 5, 0, Direction.EAST);

  //SpiderBot Climbing the Buildings.
  karel.climbBuilding();
  karel.climbDownBuilding();


    }


}

以下是错误: 错误:找不到符号第9行

0 个答案:

没有答案