Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Problems compiling

  • 21-03-2011 10:06pm
    #1
    Registered Users, Registered Users 2 Posts: 2,457 ✭✭✭


    Hey guys.

    I'm trying to recompile some code I wrote a few weeks ago for an assessment, however it's not letting me compile. I'm running JDK 6u24.


    auto.java
    public class auto extends Robot
    {
          public auto()   
    	  {
               super(); 
    	  }
    	  
    	  
    	  public auto(String colour) 
    	  {
    	      super(colour);
    	  }
    
    	  void turnRight()
          {
              turnLeft();
              turnLeft();
              turnLeft();  
          }
    
    	  void turn_180_degrees()
          { 
    	        turnLeft();
    		turnLeft();
          }
    
          void moveNumOfTimes(int x)
          {
                     
    	      int i = 1;	 
    		  System.out.println("before the while loop, the value of x = "+x+" and the value of i = "+i);
    
              while (i <= x)
    	      {
    		      System.out.println("inside the while loop, the value of x = "+x+" and the value of i = "+i);
    	          move();
                  i = i + 1;
              }   
          }   
    
          void pickUpAllBeepers()
          {
                
                 while ( beeperPresent() )
                 {
                      pickBeeper();
    				
                 } 
          }
    
       
    
         void putAllBeepers()
         {
          
             while ( hasBeeper() )
             {
                 putBeeper();
             }
         }
    
     
         int getNumOfBeepers()
    	 {
    	         int num_of_beepers = 0;
     	         int i = 0;
    
                while(beeperPresent())
                {
                       System.out.println("the value of num_of_beepers is "+num_of_beepers);       
                       pickBeeper();
                       num_of_beepers = num_of_beepers + 1;
                }
    			int y = num_of_beepers; 
    			while ( y > 0  )
                {
                     putBeeper();
    				 y = y -1;
               }
    		   return num_of_beepers;
    
       
        }
    
    }
    
    And this is the problem's I get when trying to javac compile
    auto.java:1: cannot find symbol
    symbol: class Robot
    public class auto extends Robot
                              ^
    auto.java:16: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              turnLeft();
              ^
    auto.java:17: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              turnLeft();
              ^
    auto.java:18: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              turnLeft();
              ^
    auto.java:23: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
                    turnLeft();
                    ^
    auto.java:24: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
                    turnLeft();
                    ^
    auto.java:36: cannot find symbol
    symbol  : method move()
    location: class auto
                      move();
                      ^
    auto.java:44: cannot find symbol
    symbol  : method beeperPresent()
    location: class auto
                 while ( beeperPresent() )
                         ^
    auto.java:46: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                      pickBeeper();
                      ^
    auto.java:56: cannot find symbol
    symbol  : method hasBeeper()
    location: class auto
             while ( hasBeeper() )
                     ^
    auto.java:58: cannot find symbol
    symbol  : method putBeeper()
    location: class auto
                 putBeeper();
                 ^
    auto.java:68: cannot find symbol
    symbol  : method beeperPresent()
    location: class auto
                while(beeperPresent())
                      ^
    auto.java:71: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                       pickBeeper();
                       ^
    auto.java:77: cannot find symbol
    symbol  : method putBeeper()
    location: class auto
                     putBeeper();
                     ^
    14 errors
    

    I also have another file for compiling that has a robot based on this file

    comp.java
    public class comp 
    {
       public static void main(String [] args)
    	{     
    
          World yard = new World();
    
    	  yard.addWall(1, 0, 14, "east");
    	  yard.addWall(1, 1, 7, "east");
    	  yard.addWall(10, 1, 5, "east");
    	  yard.addWall(10, 3, 5, "east");
    	  yard.addWall(10, 5, 5, "east");
          yard.addWall(3, 3, 5, "east");
    	  yard.addWall(3, 4, 5, "east");
    	  yard.addWall(1, 2, 9, "north");
    	  yard.addWall(3, 5, 8, "north");
    	  yard.addWall(4, 5, 8, "north");
    	  yard.addWall(5, 5, 8, "north");
          yard.addWall(0, 12, 3, "east");
    	  yard.addBlock(0, 13);
          yard.addWall(0, 14, 15, "east");
    	  yard.addWall(8, 13, 7, "south");
    	  yard.addWall(14, 13, 8, "south");
    
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
          yard.addBeeper(13, 6);
    
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
          yard.addBeeper(9, 6);
    
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
          yard.addBeeper(13, 9);
    
          yard.addBeeper(9, 9);
          yard.addBeeper(9, 9);
          yard.addBeeper(9, 9);
          yard.addBeeper(9, 9);
          yard.addBeeper(9, 9);
    
          yard.addBeeper(13, 13);
          yard.addBeeper(13, 13);
          yard.addBeeper(13, 13);
          yard.addBeeper(13, 13);
          yard.addBeeper(13, 13);
          yard.addBeeper(13, 13);
    
          yard.addBeeper(9, 13);
          yard.addBeeper(9, 13);
          yard.addBeeper(9, 13);
          yard.addBeeper(9, 13);
    
          auto derpy = new auto();
    
          yard.add(derpy);
    
          derpy.turnLeft();
    	  derpy.moveNumOfTimes(11);
    	  derpy.turnRight();
    	  derpy.moveNumOfTimes(2);
    	  derpy.turnRight();
    	  derpy.moveNumOfTimes(9);
    	  derpy.turnLeft();
    	  derpy.moveNumOfTimes(7);
    	  derpy.turnLeft();
    	  derpy.moveNumOfTimes(4);
          derpy.getNumOfBeepers();
    	  
    	  int num_of_beepers = derpy.getNumOfBeepers();
    		  
          int one = num_of_beepers;
     
          int two = 2;
    
          System.out.println("x is = " + num_of_beepers);
          System.out.println("two is = " + two);
    
          int result = one / two;
          System.out.print("the result of "+num_of_beepers+" divided by 2 is " + result);
             
          int remainder = one % two;
          System.out.println(" with a remainder of "+remainder);
          
          if (remainder == 0)
          {
          System.out.println("the number is even");
          }
          else
    	  { 
          System.out.println("the number is odd");
    	  }
    
    	   if ( num_of_beepers == 10 )
    	  {
    		 
    	          System.out.println("1) the number of beepers is  "+num_of_beepers);
                  derpy.pickUpAllBeepers();
    	  }
    
    	  	   if ( num_of_beepers < 10 )
    	  {
    		 
    	          System.out.println("2) the number of beepers is less than 10 and odd");
                  derpy.pickBeeper();
    			  	   if ( remainder == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    	   if ( num_of_beepers > 10)
    	  {
    		 
    	          System.out.println("3) the number of beepers is more than 10 and odd");
                  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  	   if ( remainder == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    
    
    	  derpy.moveNumOfTimes(3);
    
    	  int num_of_beepers2 = derpy.getNumOfBeepers();
    		  
          int three = num_of_beepers2;
     
          int four = 2;
    
          System.out.println("x is = " + num_of_beepers2);
          System.out.println("two is = " + two);
    
          int result2 = three / four;
          System.out.print("the result of "+num_of_beepers2+" divided by 2 is " + result2);
             
          int remainder2 = three % four;
          System.out.println(" with a remainder of "+remainder2);
          
          if (remainder2 == 0)
          {
          System.out.println("the number is even");
          }
          else
    	  { 
          System.out.println("the number is odd");
    	  }
    
    	   if ( num_of_beepers2 == 10 )
    	  {
    		 
    	          System.out.println("1) the number of beepers is  10");
                  derpy.pickUpAllBeepers();
    	  }
    
    	  	   if ( num_of_beepers2 < 10 )
    	  {
    		 
    	          System.out.println("2) the number of beepers is less than 10 and odd");
                  derpy.pickBeeper();
    			  	   if ( remainder2 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    	   if ( num_of_beepers2 > 10)
    	  {
    		 
    	          System.out.println("3) the number of beepers is more than 10 and odd");
                  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  	   if ( remainder2 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    
    
    	  derpy.moveNumOfTimes(4);
    
    
    	  int num_of_beepers3 = derpy.getNumOfBeepers();
    		  
          int five = num_of_beepers3;
     
          int six = 2;
    
          System.out.println("x is = " + num_of_beepers3);
          System.out.println("two is = " + two);
    
          int result3 = five / six;
          System.out.print("the result of "+num_of_beepers3+" divided by 2 is " + result3);
             
          int remainder3 = five % six;
          System.out.println(" with a remainder of "+remainder3);
          
          if (remainder3 == 0)
          {
          System.out.println("the number is even");
          }
          else
    	  { 
          System.out.println("the number is odd");
    	  }
    
    	   if ( num_of_beepers3 == 10 )
    	  {
    		 
    	          System.out.println("1) the number of beepers is  10");
                  derpy.pickUpAllBeepers();
    	  }
    
    	  	   if ( num_of_beepers3 < 10 )
    	  {
    		 
    	          System.out.println("2) the number of beepers is less than 10 and odd");
                  derpy.pickBeeper();
    			  	   if ( remainder3 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    	   if ( num_of_beepers3 > 10)
    	  {
    		 
    	          System.out.println("3) the number of beepers is more than 10 and odd");
                  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  	   if ( remainder3 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    
    
          derpy.turnRight();
    	  derpy.moveNumOfTimes(4);
    
    	  int num_of_beepers4 = derpy.getNumOfBeepers();
    		  
          int seven = num_of_beepers4;
     
          int eight = 2;
    
          System.out.println("x is = " + num_of_beepers4);
          System.out.println("two is = " + two);
    
          int result4 = seven / eight;
          System.out.print("the result of "+num_of_beepers4+" divided by 2 is " + result4);
             
          int remainder4 = seven % eight;
          System.out.println(" with a remainder of "+remainder3);
          
          if (remainder4 == 0)
          {
          System.out.println("the number is even");
          }
          else
    	  { 
          System.out.println("the number is odd");
    	  }
    
    	   if ( num_of_beepers4 == 10 )
    	  {
    		 
    	          System.out.println("1) the number of beepers is  10");
                  derpy.pickUpAllBeepers();
    	  }
    
    	  	   if ( num_of_beepers4 < 10 )
    	  {
    		 
    	          System.out.println("2) the number of beepers is less than 10 and odd");
                  derpy.pickBeeper();
    			  	   if ( remainder4 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    	   if ( num_of_beepers4 > 10)
    	  {
    		 
    	          System.out.println("3) the number of beepers is more than 10 and odd");
                  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  	   if ( remainder4 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    
    
    	  derpy.turnRight();
    	  derpy.moveNumOfTimes(4);
    
    	  int num_of_beepers5 = derpy.getNumOfBeepers();
    		  
          int nine = num_of_beepers5;
     
          int ten = 2;
    
          System.out.println("x is = " + num_of_beepers5);
          System.out.println("two is = " + two);
    
          int result5 = nine / ten;
          System.out.print("the result of "+num_of_beepers5+" divided by 2 is " + result5);
             
          int remainder5 = nine % ten;
          System.out.println(" with a remainder of "+remainder5);
          
          if (remainder5 == 0)
          {
          System.out.println("the number is even");
          }
          else
    	  { 
          System.out.println("the number is odd");
    	  }
    
    	   if ( num_of_beepers5 == 10 )
    	  {
    		 
    	          System.out.println("1) the number of beepers is  10");
                  derpy.pickUpAllBeepers();
    	  }
    
    	  	   if ( num_of_beepers5 < 10 )
    	  {
    		 
    	          System.out.println("2) the number of beepers is less than 10 and odd");
                  derpy.pickBeeper();
    			  	   if ( remainder5 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    	   if ( num_of_beepers5 > 10)
    	  {
    		 
    	          System.out.println("3) the number of beepers is more than 10 and odd");
                  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  	   if ( remainder5 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    
    
    	  derpy.moveNumOfTimes(3);
    
    	  int num_of_beepers6 = derpy.getNumOfBeepers();
    		  
          int eleven = num_of_beepers6;
     
          int twelve = 2;
    
          System.out.println("x is = " + num_of_beepers6);
          System.out.println("two is = " + two);
    
          int result6 = eleven / twelve;
          System.out.print("the result of "+num_of_beepers6+" divided by 2 is " + result6);
             
          int remainder6 = eleven % twelve;
          System.out.println(" with a remainder of "+remainder6);
          
          if (remainder6 == 0)
          {
          System.out.println("the number is even");
          }
          else
    	  { 
          System.out.println("the number is odd");
    	  }
    
    	   if ( num_of_beepers6 == 10 )
    	  {
    		 
    	          System.out.println("1) the number of beepers is  10");
                  derpy.pickUpAllBeepers();
    	  }
    
    	  	   if ( num_of_beepers6 < 10 )
    	  {
    		 
    	          System.out.println("2) the number of beepers is less than 10 and odd");
                  derpy.pickBeeper();
    			  	   if ( remainder6 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    	  }
    
    	   if ( num_of_beepers6 > 10)
    	  {
    		 
    	          System.out.println("3) the number of beepers is more than 10 and odd");
                  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  derpy.pickBeeper();
    			  	   if ( remainder6 == 0)
    	  {
    		 
    	          System.out.println("4) is even number");
                  derpy.pickBeeper();
    	  }
    
    	  }
    
          derpy.turnRight();
          derpy.moveNumOfTimes(4);
    	  derpy.turnLeft();
    	  derpy.moveNumOfTimes(4);
    	  derpy.turnRight();
    	  derpy.moveNumOfTimes(7);
    	  derpy.turnRight();
    	  derpy.moveNumOfTimes(9);
    	  derpy.turnLeft();
    	  derpy.moveNumOfTimes(2);
    	  derpy.turnLeft();
    	  derpy.moveNumOfTimes(11);
          derpy.putAllBeepers();
    	  derpy.turn_180_degrees();
    	  derpy.move();
    	}
    }
    

    And when I try to javac that
    comp.java:6: cannot find symbol
    symbol  : class World
    location: class comp
          World yard = new World();
          ^
    comp.java:6: cannot find symbol
    symbol  : class World
    location: class comp
          World yard = new World();
                           ^
    .\auto.java:1: cannot find symbol
    symbol: class Robot
    public class auto extends Robot
                              ^
    comp.java:85: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
          derpy.turnLeft();
               ^
    comp.java:91: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              derpy.turnLeft();
                   ^
    comp.java:93: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              derpy.turnLeft();
                   ^
    comp.java:132: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:137: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:145: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:146: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:147: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:152: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:195: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:200: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:208: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:209: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:210: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:215: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:259: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:264: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:272: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:273: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:274: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:279: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:323: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:328: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:336: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:337: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:338: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:343: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:387: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:392: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:400: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:401: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:402: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:407: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:450: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:455: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:463: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:464: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:465: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                              derpy.pickBeeper();
                                   ^
    comp.java:470: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                  derpy.pickBeeper();
                       ^
    comp.java:477: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              derpy.turnLeft();
                   ^
    comp.java:483: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              derpy.turnLeft();
                   ^
    comp.java:485: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              derpy.turnLeft();
                   ^
    comp.java:489: cannot find symbol
    symbol  : method move()
    location: class auto
              derpy.move();
                   ^
    .\auto.java:16: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              turnLeft();
              ^
    .\auto.java:17: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              turnLeft();
              ^
    .\auto.java:18: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
              turnLeft();
              ^
    .\auto.java:23: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
                    turnLeft();
                    ^
    .\auto.java:24: cannot find symbol
    symbol  : method turnLeft()
    location: class auto
                    turnLeft();
                    ^
    .\auto.java:36: cannot find symbol
    symbol  : method move()
    location: class auto
                      move();
                      ^
    .\auto.java:44: cannot find symbol
    symbol  : method beeperPresent()
    location: class auto
                 while ( beeperPresent() )
                         ^
    .\auto.java:46: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                      pickBeeper();
                      ^
    .\auto.java:56: cannot find symbol
    symbol  : method hasBeeper()
    location: class auto
             while ( hasBeeper() )
                     ^
    .\auto.java:58: cannot find symbol
    symbol  : method putBeeper()
    location: class auto
                 putBeeper();
                 ^
    .\auto.java:68: cannot find symbol
    symbol  : method beeperPresent()
    location: class auto
                while(beeperPresent())
                      ^
    .\auto.java:71: cannot find symbol
    symbol  : method pickBeeper()
    location: class auto
                       pickBeeper();
                       ^
    .\auto.java:77: cannot find symbol
    symbol  : method putBeeper()
    location: class auto
                     putBeeper();
                     ^
    59 errors
    

    I know this is probably an awful lot of work to be corrected, but I didn't keep the .class files. I was on a course in DCU a few weeks ago for Transition Year, and managed to win 50 quid with this code :pac:. We have our year assessment this Wednesday, and I'd love to be able to run this, so any help would be hugely appreciated.


    By the way, I've attached the .java files as .txt below. Cheers :)


Comments

  • Registered Users, Registered Users 2 Posts: 105 ✭✭damoth


    Your 'auto' class extends a class called 'Robot' so that Robot.class file is needed to be able to compile without errors.

    Also, your 'comp' class creates an object of type 'World' so it requires the World.class file.

    Do you have the Robot and World .java or .class files and are they in the same directory as the files you are trying to compile?


  • Registered Users, Registered Users 2 Posts: 2,457 ✭✭✭giggsy664


    Ah right. So if I can source these files it should compile grand?

    Edit:
    I think that these is the files needed to run the Robot/World


  • Registered Users, Registered Users 2 Posts: 105 ✭✭damoth


    Yep, That's exactly what you need.

    The 'robot.jar' file will contain any files you need... There's a link to download it near the top of that page so just follow the instructions and you should be fine.

    In Java a .jar file is a Java Archive - it's used to package a bunch of java files into one archive so it will contain any files required to be able to compile your program.


Advertisement