An introduction to Karel J. Robot

Modified from A Gentle Introduction to the Art of Object-Oriented Programming in Java: Joseph Bergin, Mark Stehlik, Jim Roberts, Richard Pattis

Karel J. Robot was created to provide a means of introducing novice programmers to object-oriented programming (OOP). In object-oriented programming, a computation is carried out by a set of interacting objects. Here, the objects are robots that exist in a simple world.

Questions

  1. Which directions can a robot face?
  2. What things other than robots can be found in the robot world?
  3. Which of the things listed in question 2 can a robot manipulate or change?
  4. What reference points can be used in the robot world to describe a robot's exact location?
  5. How far can a robot see?
  6. How many beepers can a robot carry?
  7. How many robots can we have in a given robot world?