 In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
 In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software which initiated the concept of Design Pattern in Software development.  These authors are collectively known as Gang of Four (GOF).
1 Creational Patterns These design patterns provide a way to create objects while hiding the creation logic, rather than instantiating objects directly using new opreator. This gives program more flexibility in deciding which objects need to be created for a given use case. 2 Structural Patterns These design patterns concern class and object composition. Concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionalities. 3 Behavioral Patterns These design patterns are specifically concerned with communication between objects.
Creational Factory Pattern Abstract FactoryPattern BuilderPattern FactoryMethodPattern PrototypePattern SingletonPattern Structural BridgePattern CompositePattern DecoratorPattern FacadePattern FlyweightPattern ProxyPattern Behavioral ChainOfResponsibilityPattern CommandPattern InterpreterPattern IteratorPattern MediatorPattern MementoPattern ObserverPattern StatePattern StrategyPattern TemplateMethodPattern VisitorPattern
 Factory pattern is one of most used design pattern in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.  Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.  In Factory pattern, we create object without exposing the creation logic to the client and refer to newly created object using a common interface.
1.Get Invoice 2.Place Booking Goa Wayanad Shimla
1.Get Invoice 2.Place Booking Goa Wayanad Shimla Coorg Munnar
 1.Customer directly communicating Hotels  2.In case of New Hotel ,have to share contact details to Customers
1.Get Invoice 2.Place Booking Goa Wayanad Shimla Coorg Munnar Marketing Office
1.Get Invoice 2.Place Booking Marketing Office Goa Wayanad Shimla Coorg Munnar
Customer Marketing Offices Different hotels/Resorts Set of rules/Procedure
Q & A

Factory Design Pattern