Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Sp2000 Midterm Review: Analyzing the Robot Car
Review at Midterm Review - Sp2000.
A RobotCar contains both a WheelControler and a collection of Wheels.
If the instances of WheelControler and Wheel have no relationship other than an indirect relationship through RobotCar, how does wheel controler communciate to the individual wheels?
Good question! Anyone? Mark Guzdial
Wouldn't you just make the WheelController have a collection of wheels? So the relationship would be part-whole?
What I got...hopefully not too far from correct:
Services: turnCCWSpeed:, turnCWSpeed:, stopTurning, rotateCCW:, rotateCW:, direction:, positionInCar
Attribs: isTurning, turningSpeed, direction, positionInCar
Services: isStatusOK, distance:, direction:, positionInCar
Attribs: positionInCar., distance, direction, statusOK
Services: isStatusOK, brightnessLevel, positionInCar
Attribs: statusOK, brightness, positionInCar
Services: isGettingLight, canStoreEnergy, rotateCCW:, rotateCW:, moveUp:, moveDown:, amountOfLight
Attribs: energyCount, direction, tilt, lightAmount
WheelController: ( kinda unclear on this one... )
Services: rotateWheelLettered:, turnWheelCCWLettered:Amount:, turnWheelCWLettered:Amount:,
Services: goToRelativePosition:, currentRelativePosition, statusOK
Attribs: aWheelController, aBunchOfDistanceSensors, aBunchOfBrightnessSensers, aSolarPanel
assume in the above, any modifier method with a ':' also has a corresponding accessor method. I hope this is somewhat close...
As for the second part? I haven't a clue...
Link to this Page