Karel J Robot - Chapter 3: Building Better Robots               BACK TO KAREL MAIN


Program 3-1: The StairClimber Class
Karel must learn to climb stairs, picking up a beeper from each step. See the initial and final situations below.

  

World File: fig3-1.kwld                                                                     BACK TO KAREL MAIN

Program 3-2: The ShelfStocker Class
Karel just got a new job stocking grocery store shelves. He has to take the items off of the floor and place them on the shelfHe should begin and end the task at (1,1). See the initial and final situations below.

          

World File: shelf.kwld                                                                     BACK TO KAREL MAIN

Program 3-3: The Harvester Class
Karel must “harvest” a field of beepers. Each row of will consist of 5 beepers, and the number of rows will always be an even number. See the initial and final situations below.

          

               

World File: fig3-2.kwld                                                                     BACK TO KAREL MAIN

Program 3-4: The Planter Class
Karel will be planting flowers in planter boxes. He will pick up 3 plants at the bottom of each planter box and then place them in a column in the boxes as shown in the example task below. Karel begins the task at (1, 1) facing East.

           


World File:
planter.kwld                                                                       BACK TO KAREL MAIN

Program 3-5: The Mover Class
Karel is rearranging office furniture. he needs to move employees desks from one cubicle to the one adjacent to it. He will then move on and do the next desk, etc... . Beginning and ending situations are as shown below. Karel begins the task at (1, 3) facing East.

          

World File: mover.kwld                                                                         BACK TO KAREL MAIN

Program 3-6: The Pinsetter Class
Karel just got a job as a pinsetter at the local bowling alley. His job requires him to set up 10 pins in the normal configuration. See the initial and final situations below.


World File:
blank.kwld                                                                     BACK TO KAREL MAIN