0% found this document useful (0 votes)
81 views9 pages

Adapter Pattern: Isuru Buddhika Pathirana

The document discusses the Adapter pattern, a structural design pattern that allows incompatible interfaces to work together by providing a common interface. It defines the Adapter pattern as a bridge between two objects that connects incompatible objects via a common interface. An analogy is provided that likens the Adapter pattern to using an adapter that allows a square pin to fit into a round pin socket. A class diagram also illustrates the pattern and key components.

Uploaded by

Isuru Buddika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views9 pages

Adapter Pattern: Isuru Buddhika Pathirana

The document discusses the Adapter pattern, a structural design pattern that allows incompatible interfaces to work together by providing a common interface. It defines the Adapter pattern as a bridge between two objects that connects incompatible objects via a common interface. An analogy is provided that likens the Adapter pattern to using an adapter that allows a square pin to fit into a round pin socket. A class diagram also illustrates the pattern and key components.

Uploaded by

Isuru Buddika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Adapter Pattern

Isuru Buddhika Pathirana

212248470

Contents

1. Design Patterns
2. Adapter Pattern
3. An Analogy
4. Class Diagram
5. Summary
6. References

212248470

Design Patterns
A relation between classes/objects
A way of solving problems
A general solution to a common problem
NOT a finished design that can directly turned to code

212248470

Adapter Pattern
Structural design pattern
A bridge between two objects
Connects two incompatible objects via a common
interface

212248470

An Analogy
Square Pin to Round Pin
adapter

212248470

Class Diagram

212248470

Summary
Structural design pattern
Allows two different ends to work together
Allows code reuse

212248470

References
Source Making n.d, Adapter Design Pattern,
Available from
https://sourcemaking.com/design_patterns/adapter
[08 October 2016]
OODesign n.d, Adapter Pattern, Available from
http://www.oodesign.com/adapter-pattern.html [08
October 2016]

212248470

Thank You
212248470

You might also like