design patterns - adapter pattern

8
ADAPTER PATTERN explained ! Prepared by Annamalai Copyright 2006-2011 QmPe initiative

Upload: annamalai-c

Post on 15-Jan-2015

1.043 views

Category:

Technology


1 download

DESCRIPTION

This presentation is part of the Design Pattern Series. Presentation explains the use of Adapter Pattern comparing it against a real life situation and then showcasing the Java implementation of the same.

TRANSCRIPT

Page 1: Design patterns - Adapter Pattern

ADAPTER PATTERN explained !

Prepared by Annamalai C

Copyright 2006-2011

QmPeinitiative

Page 2: Design patterns - Adapter Pattern

Copyright 2006-2011

Adapter Pattern in Real Life

One to Many :: One Charge can charge Many MobilesTherefore we conclude this Charge is AdaptableSimilar is Adapter Pattern. This is a Structural Pattern.

Page 3: Design patterns - Adapter Pattern

Copyright 2006-2011

Strategy Pattern in Java

Page 4: Design patterns - Adapter Pattern

Copyright 2006-2011

Real Life vs Java Object

Page 5: Design patterns - Adapter Pattern

Copyright 2006-2011

Real Life vs Java Object

Page 6: Design patterns - Adapter Pattern

Copyright 2006-2011

How Adapter Pattern works in Real Life ?

Boss decides to arrange and store the files.Strategy is then decided based on Cost, Durability etc.

Page 7: Design patterns - Adapter Pattern

How Strategy Pattern works in Java ?

Copyright 2006-2011

Page 8: Design patterns - Adapter Pattern

Copyright 2006-2011

QmPeinitiative

THANK YOU

Please visit www.eclipseinclips.com | www.ancitconsulting.com

Write to us on [email protected]