Design patterns - Adapter Pattern

Post on 15-Jan-2015

1.043 views 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 of Design patterns - Adapter Pattern

ADAPTER PATTERN explained !

Prepared by Annamalai C

Copyright 2006-2011

QmPeinitiative

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.

Copyright 2006-2011

Strategy Pattern in Java

Copyright 2006-2011

Real Life vs Java Object

Copyright 2006-2011

Real Life vs Java Object

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.

How Strategy Pattern works in Java ?

Copyright 2006-2011

Copyright 2006-2011

QmPeinitiative

THANK YOU

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

Write to us on info@ancitconsulting.com