Due Date: Tuesday Sep 28, 1999 at start of class
Assignment:
Chapter 4, Problem 6, pages 95-96
- Build a world to match the Initial Situation on page 96.
- Build a second world that matches the specifications of the problem
stated on page 95 but that is different than the world shown on page 96.
- Run your robot in both worlds before deciding that your program is
correct. Jim will use a different world than the one in the book
to grade your program.
- Your robot needs no beepers for this problem.
- Modify your "GoodRobot:" class to solve the problem. Last week
we built a "GoodRobot" class that had the additional instructions of turnRight(),
turnAround(), moveAndPut(), and putAndMove(); In typical OOP
languages you would probably define a "BetterRobot" class that is a sub
class of "GoodRobot" that inherits all of the abilities (including beeper
abilities) of the "GoodRobot" class and add a new set of instructions
that are needed for this problem. The robot simulator is not a "fun"
tool for finding simple syntax errors so you are strongly advised to add
your changes to the class "GoodRobot" - it will be easier to debug.
- IMPORTANT-CHANGE THE BASE CLASS FROM "ur_Robot" to "Robot". The class
"ur_Robot" does not have the testing ability that is needed for the problems
in the remainder of the chapters. From now on we will use the class
"Robot"
- Note that the robot's path can never take it more than one half block
away from a steeple when it is jumping the steeple.
- You may not use loops to do this lab.
Background
We are not using multiple robots for this one - just one robot object
of a robot class that you define. You may do this in one file or
use #included files - the choice is yours. Remember that each block
can have no steeple or steeples that are between 1 and 3 blocks high.
Handin Instructions:
Drag a copy of your .kpp file to the intront server's dropoff folder.
Follow this path: intront/dropoffs/15-119/lab05 Note
that you can drag a file into this folder but that you cannot open the
folder. You should name your .kpp file in with the convention: LastName.FirstIntital.Lab#.kpp.
You can also hand in to the course volume at:
/afs/andrew.cmu.edu/course/15/119/labs