Karel++
A Gentle Introduction to the Art of Object-Oriented Programming

Copyright 1997, John Wiley & Sons. All Rights Reserved.

ISBN 0-471-13809-6
You can purchase this book from the Wiley Home Page .


Preface

The programming landscape has changed significantly since the initial publication of Karel the Robot in 1981. Today there are new programming languages, new programming paradigms, and new and more powerful computers. Pascal no longer enjoys the popularity it did in the 1980s. However, the concepts of Karel are still as vibrant and valid an introduction to the programming and problem-solving processes as they were when first introduced. However, the object-oriented programming paradigm has begun to dominate the world of commercial software production.

Karel++ updates Karel the Robot to provide a means of introducing novice programmers to object-oriented programming (OOP). This book maintains the simplicity of the original and yet provides instruction that is thoroughly object-oriented from the beginning. Where the original used a syntax and methodology derived from Pascal, the present text is based closely on C++ and Java. 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. There can be one or several robots assigned to a task. The programming task is divided into two parts. The first part is defining the capabilities of the robots that are needed. The second is providing a description of the task for the robots to perform. The programmer uses his or her problem solving skills on both parts of this task.

We believe that most people will not actually have to program a computer as part of their everyday lives, either now or in the future. However, many people will need to be able to use a computer and will occasionally need to do something with the machine beyond the "ordinary." Simply put, they will have to solve some type of computer problem. We solve various kinds of problems every day; prob lem solving is part of our lives. This book will introduce you to problem-solving approaches that can be used with computers. Unfortunately, some people believe programming requires a "different" way of thinking. We don't agree with this statement. Instead of changing the way you think, this book will change how you apply your problem-solving skills to different kinds of problems.

The original Karel the Robot used procedures as the fundamental problem solving medium, as is appropriate in procedural programming. Here we apply our problem solving skills, instead, to the design of classes that describe objects (robots), as classes are the primary means of breaking a complex problem into manageable parts in object-oriented programming. The skills of procedural programming and object-oriented programming are very similar, though we look at problems from a slightly different perspective when using OOP.

For the experienced student programmer, this edition should provide insights into the problem-solving and program design processes that will make the student an even better programmer. It will also improve understanding of computer science concepts such as loop invariants and recursion. For individuals who want to begin a thorough sequence of training and education in programming, computer science, or both, Karel++ provides a solid foundation on which to begin your work.

For novice programmers, this book will give some insight into the programming process from two distinctly different points of view: the planner's and the implementer's. All the problems can be thought about, discussed, and planned in English. Once you have developed your plan, the actual syntax of the robot programming language has very few rules to get in your way as you become the implementer or programmer.

For individuals who do not want to program but need to have a feel for the process, Karel++ is an excellent tool for providing that insight.

Supplements

An Instructor's Manual will be available for the text that contains numerous pedagogical suggestions for teaching the material based on many years of using Karel the Robot in introductory programming courses at the college level; and solutions to most of the in-text exercises.

Software to simulate Karel++ is available from John Wiley & Sons (accompanying copies of this book).



Joseph Bergin,	Pace University
Mark Stehlik, Carnegie-Mellon University
Jim Roberts, Carnegie-Mellon University
Richard Pattis, Carnegie-Mellon University
July, 1996

Back to the Book Karel++