Presentation Builder Pattern OOAD
Transcript of Presentation Builder Pattern OOAD
Royal University of Phnom PenhFaculty of Engineering
Builder PatternDR: Srun Sovila
OOAD
Member : Chea PanhaMao ChendaLong LikaPeng Sony
15-12-2016
Outline
I. What is Builder Pattern ?II. StructureIII. Pros And ConsIV. Implementation
Builder Pattern
An Object creation software design pattern. A pattern designed to help you configure complex objects. Separate the construction of a complex object from its
representation. The same construction process can create different
representation
Structure
Director
Builder.BuildPart ()
<<interface>>
Product
Construct ()
<<interface>>
Builder
Buildpart ()
Concrete BuilderB
Concrete BuilderA
BuildPart ()
GetProduct ()
BuildPart ()
GetProduct ()
Concrete ProductA
Concrete ProductB
Pros and Cons
Pros• Allows you to vary a product’s internal representation• Encapsulates code for construction and representation• Provides control over steps of construction process
Cons• Requires creating a separate ConcreteBuilder for each different
type of product.
Implementation
ThankYou
Q&A