Abstract factory pattern



Hello!

Assume you have three concrete factories cadillac, Volvo and Fiat.
We also assume that each one only consist of Engine, Chassis and Steering.
So in the abstract factory and the concreate factories you will have
createEngine, createChassis and createSteering.

Normally a single instance of a Concretefactory class is created at
run-time.
This concreate factory creates product objects having a particular
implementation.

Now to my question when the client create a Concrete factory for cadillac
it will receve a reference to this created object as I mentioned above. But
this will mean that the client know that this reference is a reference to a
cadillac object handling products for this car such as Enhine, Chassis and
Steering.

I can't understand this but the point in Abstract pattern is that the client
should not be aware of the concreate classes.

But it will be aware of it when the ConcreateFactory is created


//Tony


.