Re: Dispatcher making trucks


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by adam on December 02, 2001 at 00:05:13:

In Reply to: Dispatcher making trucks posted by John on December 02, 2001 at 00:01:05:

: Can the dispatcher know what kind of tow truck its making?

: "The dispatcher must contain a list of pointers of the base tow truck type."
: "The dispatcher may ask tow trucks if they are busy or available, and assign them tasks, but the dispatcher does not know which type of tow truck he is talking to."
: If the dispatcher contains the list of pointers of trucks, why wouldnt it be able to know which type of tow truck it is talking to?

well the dispatcher should not be making trucks also the point of polymorphism is for it to work even if it doesnt know what kind of a truck it is. but i gues you COULD make a function that does that.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]