Karel J Robot OOP approach to learning computer science

Slides:



Advertisements
Similar presentations
Karel – Making More Complex Decisions IF / THEN / ELSE IF THEN BEGIN Instructions END ELSE BEGIN Instructions END Do these when test = False Do these when.
Advertisements

1 Note: Original slides provided by and modified for this specific classwww.apComputerScience.com.
1 of 3 Karel Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.
Copyright, Joseph Bergin
1 Karel J Robot-Lesson 3 NTSD-Mr. Moon Karel J Robot Lesson 3 A Gentle Introduction to the Art of Object-Oriented Programming in Java.
Cartographic Order Specified Task Robot. Overview  Design and build a compact robot to traverse a maze.  Perform tasks located throughout the maze in.
Karel the Robot -- ITERATE Problem Statement: Karel is told to “take a walk around the block!” Revise Algorithm: Define move ahead 5 streets Define turnright.
Polymorphism Are there different ways to solve the Harvester problem? – Robot teams – instead of one robot to solve a problem, let’s get a team of robots.
A-Mazers Team Members Isaiah Grigos Chris Hart Erick Rua Eddie Miner.
Robot? What’s a Robot? Introducing Karel-the-Robot.
Karel JRobot Karel is an educational programming language for beginners, created by Richard E. Pattis (currently at Pace University, NY). Pattis used the.
Chapter 5 Conditionally Executing Instructions
1 karel_part5_loops Iteration (Loops) Loops repeat a set of instructions Two types of loops: –Definite loops ( for ) perform instructions explicit (known)
1 Classes begin with capital letters (i.e. UrRobot). Methods, objects, and variable names begin with lower case (camelCase) Use indentation to line up.
1 Ch. 7 Recursion similar to iteration in that you repeatedly do a little bit of the task and then “loop” again and work on a smaller piece - eventually.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com.
Karel J. Robot A Gentle Introduction to the Art of Object Oriented Programming.
Karel the Robot A Gentle Introduction to the Art of Programming.
Thanks to Dr. Kris Schindler for this (and all Karel the Robot slides)
Karel J. Robot Tool for learning OOP (Lecture covers Ch. 1 and 2)
1 karel_part2_Inheritance Extending Robots Tired of writing turnRight every time you start a new karel project. How do we avoid re-writing code all the.
1 Karel – Chapter 6 Instructions That Repeat Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com If you.
1 Karel – Chapter 5 Conditionally Executing Instructions Note: Original slides provided by and modified for Mr. Smith’s AP Computer.
Karel the Robot A Gentle Introduction to the Art of Object- Oriented Programming in Java.
1 Karel J Robot OOP approach to learning computer science “Its study involves development of the ability to abstract the essential features of a problem.
Georgia Institute of Technology Simulations Barb Ericson Jan 2005.
15-100: Introduction to Programming w/ Java * Ananda Gunawardena -- Lecture – School of Computer Science – Phone : (x81559) – Office: Wean Hall.
Introduction to OOP in VB.NET using Robots ACSE Conference, Nov 2004 Michael Devoy Monsignor Doyle C.S.S., Cambridge
Lesson 7: Controlling Technology Systems Lesson 7 Big Idea Controls are mechanisms or activities that use information to cause systems to change. Purpose.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com Day 4.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com.
Ch. 2 1 Karel – Primitive Instructions Basic tools with which all problems are solved (analogies: carpentry, geometry) –move() –turnLeft() –putBeeper()
Karel J. Robot Chapter 6 Instructions That Repeat.
Mile-long hurdle race Suppose that we want to program Karel to run a one-mile long hurdle race, where vertical wall sections represent hurdles. The hurdles.
Karel the Robot – Review Primitive Commands move pickbeeper putbeeper turnleft turnoff Karel’s program statements are separated by a semicolon (;) Copyright.
COMMUNITY BOARD 4 Landmarks Committee Potential Hell’s Kitchen Landmarks December 6, 2008.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com.
Cupid Shuffle.  Everyone find a line on the floor and face the stage.  Now put your arms stretched out to your sides, you should not be able to touch.
Karel the Robot – Review Primitive Commands move pickbeeper putbeeper turnleft Turnoff Karel’s program statements are separated by a semicolon (;) Copyright.
Karel the Robot – Review Primitive Commands move pickbeeper putbeeper turnleft Turnoff Karel’s program statements are separated by a semicolon (;) Copyright.
1 Karel J. Robot Chapter 5 Conditionally Executing Instructions.
The Atom + Electronic Configuration Additional Science GCSE Chemistry.
Karel J. Robot Chapter 6 Instructions That Repeat.
1/28/2008ITK 1681 An enhanced robot Robot int street int avenue Direction direction ThingBag backback Robot(City aCity, int aStreet, int anAvenue, Direction.
Karel – Primitive Instructions
Mile-long hurdle race Suppose that we want to program Karel to run a one-mile long hurdle race, where vertical wall sections represent hurdles. The hurdles.
In the beginning… software
Physical Features North Africa GOVERNMENT RELIGION RESOURCES
Copyright © 2008 by Helene G. Kershner
Introduction to Computational Thinking
Loops We have already seen instances where a robot needs to repeat instructions to perform a task turnRight(); moveMile(); Harvesting beepers in a field.
Copyright © 2008 by Helene G. Kershner
Karel J Robot.
Karel – Primitive Instructions
Karel J Robot Chapter 4 B.
Karel J Robot.
CS 106A, Lecture 2 Programming with Karel
Algorithm The key is the step-by-step instructions.
Karel the Robot – Making Decisions
SSEA Computer Science: CS106A
Engelhorn/danmor apts 410 West 3rd Avenue
2008 Dirty Dog Run Course St Rt 46 North Main Street
A Gentle Introduction to the Art of Object Oriented Programming
Karel J Robot OOP approach to learning computer science
Algorithm The key is the step-by-step instructions.
Nested If Statements While Loops
slides courtesy of Eric Roberts
Question 1. Question 1 What is 10 x 40? A 40 B 400 C 4000 D 4.0.
Karel – Primitive Instructions
Presentation transcript:

Karel J Robot OOP approach to learning computer science “Its study involves development of the ability to abstract the essential features of a problem and its solution, to reason effectively in the abstract plane, without confusion by a mass of highly relevant detail.” (C. Hoare)

Karel J (the Robot) Robot World A flat plane of streets (east-west) and avenues (north-south) Avenues Streets Corner (many robots may occupy)

Karel’s World (cont’d) Contains Beepers and Walls Beepers May be picked up, carried, and placed again May place several on a corner and they don’t interfere with Robot movement

Robot Capabilities Move Turn Sense surroundings hear beepers (on same corner) Determine direction it is facing Pick up, carry, and put down beepers Turn itself off

Karel-Werke Factory - Builds the robots Factory – Delivers the robots “factories” (auf Deutsch) Factory - Builds the robots Standard model Write a spec for a new model Extension of an existing base model Factory – Delivers the robots

Tasks & Situations Examples Move to a corner (3rd St. & 5th Ave.) Run a race Escape from a maze Find a beeper and deliver it to the origin