Parson's Problems: Multiple For loops in one program

DIRECTIONS:

Construct a working program by dragging & dropping lines from the left to the right. You'll need to change the order of the lines and you'll need to adjust the indentation correctly.

You should have the robot sprint for a while, then turn around and come back.

Specifically, the robot should move 15 spaces forwards (using a for loop), then turn around for the return trip by turning left, moving forwards 1 intersection, then turning left again  (so it ends up one street north of it's starting street).  At that point the robot should move 14 spaces back towards the begining (again using a for loop).  Once it's gone that far it should finish by turning left one last time. // logical error: there are only 3 stacks of things

import becker.robots.*;


class SmarterRobot extends Robot
{
   SmarterRobot(City c, int st, int ave, Direction dir, int num)
   {
      super(c, st, ave, dir, num);
   }

   public void pickFour()
   {
      for ( int i = 0; i < 4; i++)
      {
         this.pickThing();
      }
   }
}


public class Parsons_ForLoops_In_Commands extends Object
{
   public static void main(String[] args)
   {
      City wallville = new City(10, 10);
      SmarterRobot rob = new SmarterRobot(wallville, 7, 0, Direction.EAST, 0);
   
      // we are using for loops to stack things 4 deep:
      for(int i = 0; i < 4; i++)
      {
         new Thing(wallville, 7, 1);
      }
      for(int i = 0; i < 4; i++)
      {
         new Thing(wallville, 7, 2);
      }
      for(int i = 0; i < 4; i++)
      {
         new Thing(wallville, 7, 3);
      }
         
      for ( int counter = 0;
            counter < 15; 
            counter++) 
      {
         rob.move();
         rob.pickFour();
      }
   }
}   
	        // FIX THIS PART!!!
   }
}

Check your work by clicking on the button labeled "Get Feedback" at the bottom of this page.