Design patterns are mostly “evolved” rather than “discovered”. None of these patterns force you anything in regard to implementation; they are just guidelines to solve a particular problem , in a particular way ,in particular contexts. Code implementation is developers responsibility.
Their are different ways that an object can be created.The most commonly know way of creating an object is using the new keyword.
Book book = new Book ();
The new Operator creates the instance of an object, but this is hard-coding.
While coding, hard coding is the last thing one should do. Also, at times the very nature of the object which is created can change according to the nature of the program. In such scenarios, we can make use of patterns to give this a more general and flexible approach.
Types of Creational Design Patterns
|1) Factory Pattern|
|2) Abstract Factory Pattern|
|3) Builder Pattern|
|4) Prototype Pattern|
|5) Singleton Pattern|
STRUCTURAL DESIGN PATTERNS