Please enable JavaScript.
Coggle requires JavaScript to display documents.
Design Pattern - Coggle Diagram
Design Pattern
Creational Pattern
Factory Method
provides an interface for creating objects in superclass that allows superclass to alter the type of objects that will be created
-
-
-
Singleton
a class has only one instance, while providing a global access point to this instance
-
Disadvantage
requires treatment in multithread environment that multiple threads won create a singleton object several times
-
-
Builder
-
-
Disadvantages
because of multiple creation of new classes , code complexity increases
-
-