0
0
Sep 17, 2017
Factory : While creating object , you have to pass the concrete- product -class object from Factory.
There is no interaction between client and concrete class. Client Interacts with Factory Only. Client just calls Factory method, and in turn - factory calls respective concrete product via inheriting abstract product
Abstract Factory : While creating object , you have to pass the concrete -factory object to call Abstract Factory method, which in turn, calls respective factory related Methods.
Again, no interaction is there between client and concrete class.Client Interacts with Abstract Factory Only.
Client just calls Abstract Factory method, and in turn - Abstract factory calls respective concrete product via implementing its method in concrete Factory.
Simple Rule : Abstract Factory = Factory 1 + Factory 2 + ------------Factory n , so simply , you have to pass concrete factory object to get respective factory methods , and definitely intern class calls methods ---- based on this factory instance. Rest is same as in factory . So this way, you get all the products of required group.