View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Sum00 Final Exam Review: Design Patterns

I'll take a stab at this one.

a. Factory Method and Abstract Factory Method are both used for the exact same purpose: the need for a creational abstraction that lets someone focus on the interface for a class instead of the actual implementation and thus let subclasses decide exactly what to instantiate. However, the real difference between them is that Factory Method has subclasses call the instance needed directly and in Abstract Factory, an abstract method calls the subclass, which in turn calls the instance needed. Therefore, Abstract Factory has an extra level of abstraction associated with it.

b. Adapter is used when a piece of code already exists and you need to "modify" it to serve your needs by putting a "wrapper" around it to get the data you want to manipulate from it and a Bridge is used when you want to seperate the implementation and the interface to have cohesion in the program between any number of possibilities for different implementations. They are similar since they are both just trying to abstract away the implementation of the code to help make it easier to understand and use.

Adam Blaiss

I'll try as well...

A) Abstract Factory v. Factory Method


B) Adapter v. Bridge



The class slides refer to the Bridge pattern as a behavior pattern. I can understand that to some degree due to the reference to the implementation within the abstraction, but in Design Patterns: Elements of Reusable Object-Oriented Software, the Bridge pattern is definitely classified as a structural pattern. A little help here?

Kathy Gray

A mixup in the slides – the book is right. Mark Guzdial

If anyone doesn't follow the above (it's written in OO-speak :-), please ask questions. Mark Guzdial

Heh I wish I understood what Kathy just wrote. Patterns seem to be this really useful thing...but there's this learning curve...
I dont understand the above...last minute help please

Link to this Page