File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply 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: 109
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: 2159
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.
 
 
subject: Adapter pattern question at an interview
 
Threads others viewed
A confusing answer...
Passed with 145/155
Is This is an Adapter Pattern ?
SCEA assignment query
NX: Remote/IOException in DBServices interface (Ken...?)
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com