- Karel++
Infobox programming language
name = Karel++
paradigm = object-oriented
year = 1990s
designer =
developer =
latest release version =
latest release date =
typing =
implementations =
dialects =
influenced_by = Karel
influenced =Karel++ is a didactic
object-oriented programming language designed solely as an introduction to preliminary, object-oriented programming. It is conceptually based upon a separate programming language calledKarel .Nomenclature
The Karel++ programming language was appropriately named after Czech writer,
Karel Čapek (most commonly associated with contriving the common word, 'robot '). The 'plus plus' suffix of the title was presumably adapted from the popular object-oriented programming language,C++ .Contrasting Karel the Robot with Karel++
yntax and methodology
Karel the Robot, released in
1981 , containssyntax andmethodology deriving from Pascal; whereas Karel++ provides a basis for thelogistics ofC++ and Java. In Karel the Robot, the programmer is provided with the funamentalproblem solving medium, although in Karel++, the user has the ability to apply their problem solving skills with the construction ofclasses .Robot World
Because Karel++ is an OOP language, a
virtual world is provided for the user in order to physically see theircode application.These
robot s inhabit a world lacking any sort of definite structure — it is simply a grid of horizontal "streets" and vertical "avenues" along which each robot can move. The map of each world is only capable of containing a set ofwall s and/orbeeper s. Beepers are items capable of manipulation granted the robot can lift these objects and place them in itsbeeper bag ; walls are items incapable of any manipulation.Example
An example of a Karel++ program when robot is located on (1, 2), facing east and holding 0 beepers (This code is intended to be placed within
task{}
): ur_Robot Karel(1, 2, East, 0); Karel.move(); Karel.move(); Karel.pickBeeper(); Karel.move(); Karel.turnLeft(); Karel.move(); Karel.move(); Karel.putBeeper(); Karel.move(); Karel.turnOff();References
*Bergin, Joseph (1997) "Karel++: A Gentle Introduction to the Art of Object-Oriented Programming", John Wiley & Sons, Inc. ISBN 0-471-13809-6
External links
* [http://pclc.pace.edu/~bergin/karel.html Karel++ Homepage] - official homepage for Karel++
* [http://www.cs.xu.edu/csci170/00s/karel.html Karel++ Info] - provides Karel++ download for Windows
Wikimedia Foundation. 2010.