top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between factory and abstract factory pattern?

+1 vote
309 views
What is the difference between factory and abstract factory pattern?
posted Jan 23, 2017 by Dhaval Vaghela

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

With the Factory pattern, you produce implementations (Apple, Banana, Cherry, etc.) of a particular interface -- say, IFruit.

With the Abstract Factory pattern, you produce implementations of a particular Factory interface -- e.g., IFruitFactory. Each of those knows how to create different kinds of fruit.

answer Jan 23, 2017 by Karthick.c
Similar Questions
+2 votes

What is the difference between abstract class and concrete class in java. If concrete class is final then how can inherit concrete class, can someone please explain in detail?

...