
Name __________________________________________
Answer 9 of the following questions. Indicate which of the questions you wish to be graded.
Answer essay questions as briefly as possible. Since the midterm we have covered the follow-
ing patterns: Functor, Interpreter, Strategy, State, Flyweight, Factory Method, Abstract Factory,
Prototype, Builder, Model-View-Controller, Smart UI, Memento, Bridge, Facade, Pipe & Filters
and Broker.
1. Many design patterns make it easy to change some aspect of a system. Which pattern
would best make it easy to change:
A. The type of an object that a method returns.
B. You need to change what is created from a complex description of the object.
C. You need to be able to change the hardware and software platform an object runs on.
2. The text claims that design patterns help overcome some common causes of redesign of a
system. What pattern would you use to handle the following issues.
A. Algorithmic dependencies.
B. Dependence on object representations or implementations.
3. Since the midterm we have covered three patterns that often use the Flyweight pattern. List
two such patterns.
4. What is the difference between intrinsic and extrinsic state? Give an example of each.
5. Under what conditions does the Smart UI pattern indicate that one should not use the MVC
pattern in developing desk-top GUI applications?
6. The Builder pattern would be simpler to implement if the directory and builder were com-
bined into one class. What advantages does we gain by keeping them separate?
7. The text states that one can allow clients to bypass a facade and interact with components
of the subsystem. What are the consequences (good & bad) of doing this?
5/14/09!CS 635 Final Exam!Page 1 of 2