- Explain the Flyweight, Builder, Mediator and Memento patterns.
- Describe the decorator pattern and how it is used within the java.io package. Answer: Decorators are used to provide additional functionality to an object of some kind. The key to a decorator is that a decorator "wraps" the object decorated and looks to a client exactly the same as the object wrapped. This means that the decorator implements the same interface as the object it decorates. For example, a BufferedReader is just a decorator for a Reader.
-
Observer Pattern:
- Draw the class diagram for the Observer Pattern.
- What instance variables would you have in the Observable class?
- What would happen if an Observer removes himself from the observers list when he is notified?
- What is thread-safety and how can you make the Observer Pattern thread-safe?
- Name your favourite design pattern.
- Explain the Model-View-Controller (MVC) compound design pattern. What patterns is it composed of?
Friday, June 18, 2010
Design Pattern Interview Questions
Labels:
design patterns,
interview
Subscribe to:
Post Comments (Atom)
Good work
ReplyDeletehttp://pragyarawal.blogspot.com/