






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case 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?
Michael Emard
Good question! Anyone? Mark Guzdial
Wouldn't you just make the WheelController have a collection of wheels? So the relationship would be part-whole?
Susi
What I got...hopefully not too far from correct:
Classes:
Wheel
DistanceSensor
BrightnessSensor
SolarPanel
WheelController
RobotCar
Services/Attributes:
Wheel:
Services: turnCCWSpeed:, turnCWSpeed:, stopTurning, rotateCCW:, rotateCW:, direction:, positionInCar
Attribs: isTurning, turningSpeed, direction, positionInCar
DistanceSensor:
Services: isStatusOK, distance:, direction:, positionInCar
Attribs: positionInCar., distance, direction, statusOK
BrightnessSensor:
Services: isStatusOK, brightnessLevel, positionInCar
Attribs: statusOK, brightness, positionInCar
SolarPanel:
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:,
Attribs: aBunchOfWheels
RobotCar:
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