

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CS 635 Final Exam, May 22, 2001
Name___________________________
Answer 9 questions. Indicate which 9 questions you are answering. Do not answer more than 9 questions. Each question is worth 10 points.
Patterns covered in class: Abstract Factory Adapter Bridge Builder Chain of Responsibility Command Command Processor Composite Decorator Facade Factory Method Flyweight Interpreter Iterator Mediator Memento Null Object Observer Prototype Proxy Singleton State Strategy Template Method Visitor
a. Explain why tight coupling is not desirable. b. Select one pattern other that Observer that reduces tight coupling. Explain how it helps reduces tight coupling.
2
In object-oriented programming one is advised to avoid case (and if) statements. Select one design pattern that helps avoid case statements and explain how it helps.
The patterns in the text are grouped into three types of patterns: Creational, Structural, and Behavioral. Clearly the creational patterns are related to creating objects. The State pattern is listed as behavioral, when it clearly defines some structure. The Proxy is listed as a Structural pattern when it clearly has behavior. What is the difference between Structural and Behavioral patterns? Provide criteria for determining if a new pattern should be considered Structural or Behavioral. The criteria must also explain why the current patterns are classified as they are.
a. What are the two main design principles used in design patterns? b. Select one pattern that uses both principles. Show how it uses both.
In the follow 2 problems two patterns are listed. The paired patterns are similar in some fashion. Explain how the patterns are different. You should cover when each pattern would be used over the other, the differences in intent of the patterns and any structural differences.