| Create a new class RememberingRobot (RR) which is a
child of the Robot class. This new robot will have an attribute (also
known as an instance variable)
that keeps track of how many Things it has picked up. Name the attribute
pickedThings Override the
pickThing method of the
RR class, to increase the
attribute (instance variable) by one and then pick up the Thing.
Display the value of items picked up on the back of the robot.
Start your robot at avenue 0 and street 6 facing North. Instruct your
robot to move north and pick up a Thing at each of the 4 corners above it.
Your robot should stop at avenue 0, street 0. Use the city file Victoria.txt.
Test your program thoroughly. Document task code and new robot class
properly.
Do NOT hand in your work unless other instructions were given.
Challenge:
1) Create a new method and have RR pick up all of the items on an
intersection. Display the information on the back of RR.
|