wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Adapter pattern question at an interview Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Adapter pattern question at an interview" Watch "Adapter pattern question at an interview" New topic
Author

Adapter pattern question at an interview

divya kundapur
Ranch Hand

Joined: Aug 21, 2007
Posts: 110
Hi,

I was asked to mention any design patterns used in the project, so i told adapter pattern is used to make 2 different systems work together.

Eg: I have two systems with different object structures , so i used adapter pattern there to make these 2 systems work together.

But the interviewer was not happy with it. Can anybody please let me know whats worng here.


SCJP - 5.0
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Sounds good to me. Maybe he was fishing for the term incompatible interfaces?


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
The objective of the Adapter design pattern is to enable "objects" to work together. Your statement of using the pattern to make two "systems" work together is a bit off key.

"Systems" and "objects" are not the same terms and cannot be used interchangeably, in my opinion.

I would have been looking for you to explain the what, why and how of what you implemented in the "project", rather than a rudimentary answer not related to the "project." Demonstrating that you might know the definition of a design pattern does not show that you have experience implementing the pattern.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adapter pattern question at an interview
 
Similar Threads
Is This is an Adapter Pattern ?
NX: Remote/IOException in DBServices interface (Ken...?)
SCEA assignment query
Passed with 145/155
A confusing answer...