Table of Contents

Simple Factory

Factory Method

UML Code (PlantUML)

@startuml
Product <|-- ConcreteProduct
Creator <|-- ConcreteCreator
ConcreteCreator ..> ConcreteProduct

class Creator {
  {abstract} fabricmethod()
  oneOperation()
}

class ConcreteCreator {
  fabricmethod()
}
@enduml

Advantages

Disadvantages

Abstract Factory