Posted by tyler on November 22, 2001 at 21:42:46:
In Reply to: who has the truck?? posted by James on November 21, 2001 at 11:03:39:
you're right.. it says "has a".. which is aggregation, so when they say "A simulated clock drives most changes within the system," i'm assuming they don't mean the tow trucks directly, but the tow trucks vicariously through the dispatcher... but then again.. it's not good to have the dispather tell the trucks what to do precisely. but using polymorphism you could.. just have .. oh i dunno.. a generic "DoStuff" function and that would leave the deciding to the trucks, but the notification to the dispatcher. hope that helps some.
: The specifications for project 3 state that the dispatcher "has a" list of tow trucks. Does this mean we shouldn't have a truck controller. If the dispatcher has a list, doesnt "has a" imply aggregation? So if the dispatcher has the list of trucks, wouldnt he/she be directly responsible for truck operations, move, pickup, etc....
Post a Followup