Creational Patterns
• Abstract Factory:- Creates an instance of several families of classes• Builder: - Separates object construction from its representation
• Factory Method:- Creates an instance of several derived classes.
• Prototype:- A fully initialized instance to be copied or cloned
• Singleton:- A class in which only a single instance can exist
Note: - The best way to remember Creational pattern is by remembering ABFPS (Abraham Became First President of States).
Factory:
if we add new concrete invoice type we do not need to change any thing at the client side.
Abstract Factory :
Builder
Prototype:
No comments:
Post a Comment