Posts

Showing posts with the label C# | Abstract Factory Pattern

C# | Abstract Factory Pattern | Creational Design Pattern

Image
Abstract Factory patterns act as a super-factory which creates other factories. This pattern is also called as Factory of factories. In Abstract Factory pattern an interface is responsible for creating a set of related objects, or dependent objects without specifying their concrete classes. UML Diagram The classes, interfaces and objects in the above UML class diagram are as follows: 1.       AbstractFactory This is an interface which is used to create abstract product 2.       ConcreteFactory This is a class which implements the AbstractFactory interface to create concrete products. 3.       AbstractProduct This is an interface which declares a type of product. 4.       ConcreteProduct This is a class which implements the AbstractProduct interface to create product. 5.       Client This is a class which use AbstractFactory and AbstractProduct ...