design pattern in software engineering
TRANSCRIPT
![Page 1: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/1.jpg)
Design PatternManish KumarRoll-13118037Semester-6th
National Institute of Technology Raipur ,India
![Page 2: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/2.jpg)
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
![Page 3: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/3.jpg)
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.
![Page 4: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/4.jpg)
Classification of Design Pattern
![Page 5: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/5.jpg)
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.
![Page 6: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/6.jpg)
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.
![Page 7: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/7.jpg)
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.
![Page 8: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/8.jpg)
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.
![Page 9: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/9.jpg)
Architecture
![Page 10: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/10.jpg)
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%
![Page 11: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/11.jpg)
![Page 12: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/12.jpg)
![Page 13: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/13.jpg)
![Page 14: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/14.jpg)
![Page 15: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/15.jpg)
Benefits of Strategy Design Pattern
1.Eliminates large conditional statements.
2.Provides a choice of implementations for the
same behavior.
![Page 16: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/16.jpg)
References
• https://en.wikibooks.org/wiki/Introduction_to_Software_Engineering/Architecture/Design_Patterns
• https://en.wikipedia.org/wiki/Software_design_pattern
• https://sourcemaking.com/design_patterns/strategy
• http://www.slideshare.net/ganeshkolhe/strategy-design-pattern-12032203?related=5
• http://www.tutorialspoint.com/design_pattern/strategy_pattern.htm
• http://www.oodesign.com/strategy-pattern.html
![Page 17: Design Pattern in Software Engineering](https://reader036.vdocuments.net/reader036/viewer/2022062502/58ab3e5b1a28ab61758b45a7/html5/thumbnails/17.jpg)