Karel JRobot Karel is an educational programming language for beginners, created by Richard E....

10
Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the language in his courses at Stanford University, California. The language is named after Karel Capek, a Czech writer who introduced the word robot.

Transcript of Karel JRobot Karel is an educational programming language for beginners, created by Richard E....

Page 1: Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.

Karel JRobot

• Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY).

• Pattis used the language in his courses at Stanford University, California.

• The language is named after Karel Capek, a Czech writer who introduced the word robot.

Page 2: Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.

Karel

• Karel the Robot was first introduced over 25 years ago as a vehicle for introducing students to programming, at a time when the dominant language for teaching programming was Pascal.

• It was revised as Karel++ (for C++)• The current version - called Karel J. Robot -

is programmed using Java, and runs using a robot simulator, also written in Java.

Page 3: Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.

What is Karel?

• A program in Karel is used to control a simple robot named Karel that lives in an environment consisting of a grid of streets (left-right) and avenues (up-down).

• Karel understands five basic instructions: – move (Karel moves by one square in the direction he is

facing), – turnLeft (Karel turns 90 ° left), – putBeeper (Karel puts a beeper on the square he is standing

at), – pickBeeper (Karel lifts a beeper off the square he is

standing at), and– turnOff (Karel switches himself off, the program ends).

Page 4: Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.

Karel

• Karel can also perform boolean queries about his immediate environment, asking whether there is a beeper where he is standing, whether there are barriers next to him, and about the direction he is facing.

• A programmer can create additional instructions by defining them in terms of the five basic instructions, and by using conditional control flow statements if and while with environment queries, and by using the iterate construct.

Page 5: Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.

Karel is Kool

• Visual Feedback is Powerful – students see their mistakes/triumphs

• Students stay within one common metaphor for a while so they can focus on important topics and retain some prior knowledge as they move through the topics – it won’t seem so disconnected to them

• Most major concepts are covered in short period of time– Inheritance, Polymorphism, Abstraction, Encapsulation, OOP-

Design, Recursion, Iteration, Selection, …

Page 6: Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.

More reasons Karel is Kool…

• Karel filters out many (relevant) details so one can focus on the major concepts– Not in danger of losing sight of the Forest (computer

science) through the details of the Trees (java details) • It’s 100% Java • Karel introduces many major topics in a short period

of time – not too much detail– then, as the year goes on, you will spiral back through

those topics introducing more and more detail as required

Page 7: Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.

Teaching OOD from the Beginning

Even more reasons Karel is Kool…

• Variety of robot tasks are both plentiful and provocative – all based on a set of primitives

• Up and running with coding in a very short period of time – students get hands-on, non-trivial experience – immediately

• FREE!

Page 8: Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.

Teaching OOD from the Beginning

Lots of supporthttp://www.apcomputerscience.com/karel/index.htm