Structural Design Patterns: Part-2
Structural Design Patterns: Part-2
Design Patterns
Chapter-3
Part-2
Purpose
Creational Structural Behavioral
Interpreter
Class Factory Method Adapter Template Method
concept of abstraction.
abstraction.
• Several implementation deviations support to
achieve the inheritance.
• However, this permanently binds the
implementation to the abstraction limiting the
flexibility.
• There can be situations when you want to
modify or extend the abstraction as well as the
implementations independently.
• Bridge pattern will help to resolve that limitation
by decoupling the abstraction from its
implementation.
• This pattern is a fine example of the concept of
‘Prefer composition over inheritance’
GOF definition for bridge design pattern,
independently.”
What is Abstraction?
• If we think of the point of Java language, abstraction
can be defined by an interface or by an abstract
class. It is a very narrow way to define the concept of
abstraction.
• When thinking as an object-oriented concept,
abstraction is just a representation or a
generalization to more complex detail.
• Abstraction covers the details of concrete
implementation of the whole thing.
• Normally, when an abstraction requires more