Getting used to Parson's Problems: Fixing just part of the program

DIRECTIONS:

The goal is for you to get used to using the Parson's Problem tool itself in a way that gets around the problem of having to rearrange lots and lots of 'boilerplate' lines

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.

The code should first create a City, then a Robot, then a Thing. Once that's done you should have the robot move forwards (so that it's on the Thing), pick the Thing up, then move forwards again).

What's new for this exercise is that you will only fix PART of the program - namely, the lines marked "FIX THIS PART".  Normally you'll be given something like this:  This is because Java has a lot of lines that are important for Java, but aren't so important for us humans studying today's topic

import becker.robots.*;
public class ICE_01_Tutorial_1 extends Object
{
   public static void main(String[] args)
   { 
      City toronto = new City();
      Robot karel = new Robot(toronto, 3, 0, Direction.EAST, 0);
      new Thing(toronto, 3, 1);
      // FIX THIS PART!!!
   }
}

and you will be expected to produce a program like this:

import becker.robots.*;
public class ICE_01_Tutorial_1 extends Object
{
   public static void main(String[] args)
   { 
      City toronto = new City();
      Robot karel = new Robot(toronto, 3, 0, Direction.EAST, 0);
      new Thing(toronto, 3, 1);
      karel.move();
      karel.pickThing();
      karel.move();      
   }
}

You do that by fixing only the parts that are bold-faced and highlighted, so the answer that you'll actually set up below looks ilke this:

      karel.move();
      karel.pickThing();
      karel.move();

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