2. OUTLINE
• What is Design Pattern?
• Classification of Design Pattern
• Creational patterns
• Structural patterns
• Behavioral patterns
• Strategy Design Pattern
• Architecture
• Applications And Examples
• Benefits of Strategy Design Pattern
3. What is Design Pattern?
In software engineering, a design pattern is a general reusable
solution to a commonly occurring problem in software design.
A design pattern is not 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.
5. Creational patterns
• In software engineering, creational design
patterns are design patterns that deal with object
creation mechanisms,
• trying to create objects in a manner suitable to
the situation.
• The basic form of object creation could result in
design problems or added complexity to the
design. Creational design patterns solve this
problem by somehow controlling this object
creation.
6. Structural patterns
• In Software Engineering, Structural Design
Patterns are Design Patterns that ease the
design by identifying a simple way to realize
relationships between entities.
7. Behavioral patterns
• In software engineering, behavioral design
patterns are design patterns that identify
common communication patterns between
objects and realize these patterns. By doing
so, these patterns increase flexibility in
carrying out this communication.
8. Strategy Design Pattern
• Define a family of algorithms, encapsulate
each one, and make them interchangeable.
Strategy lets the algorithm vary independently
from the clients that use it.
10. Applications And Examples
• Shopping mall Example
1. Accept Customer Details
2. calculate the bill
3.Apply Discount Based on day of the week
(a) Monday Low discount -10%
(b) Thursday High discount-50%
11.
12.
13.
14.
15. Benefits of Strategy Design
Pattern
1.Eliminates large conditional
statements.
2.Provides a choice of
implementations for the
same behavior.