hts.StevenWood.com

Karel 3

Home ] Up ] Karel 1 ] Karel 1b ] Karel 2 ] Karel 2b ] [ Karel 3 ] Karel 4 ] Karel 5 ] Karel 5b ] Karel 6 ] Karel 6b ] Graphics: Types some words ] Graphics: Spell your name ] Graphics: Fall scene ][ Last Page ]

Karel 3

Complete the following in class or for homework.

1. Create a new type of robot name StairClimbingRobot, which is a subclass of the ExperimentRobot you used in your last assignment. 

This child class should have a method called climbStair, which has the robot turn left, move up, turn right and move. 

In your robot task, create a StairClimbingRobot object, instead of a ExperimentRobot object. Use this new robot to walk up the stairs and pick up the Thing at each step, until it has all the steps cleaned. Move onto the top step and face North. Use the city file Thornhill.txt . Start your robot at avenue 2, street 6, facing East, with no things in its backpack, as shown (the robot is the red arrowhead). 

Test your program thoroughly. Document your task code properly.

Do NOT hand in your work unless other instructions were given.

 
Home ] Up ] Karel 1 ] Karel 1b ] Karel 2 ] Karel 2b ] [ Karel 3 ] Karel 4 ] Karel 5 ] Karel 5b ] Karel 6 ] Karel 6b ] Graphics: Types some words ] Graphics: Spell your name ] Graphics: Fall scene ][Last Page]
All material on this site is copyright © 1997- by Steven Wood or as credited. All right reserved. Use of this site indicates you agreement with the  terms of use.
Send comments or questions to about this page.
Every attempt has been made to credit work under copyright. If there are any claims that copyright has been missed please contact the .
+SDG+