CS 635 : Past Exams
SDSUCS 635 Object-Oriented Design & Programming
Spring Semester, 1998
CS 635: Past Exams

To Course Web Site
San Diego State University -- This page last updated March 20, 1998

The following is the Final exam given last year in this course. It is the only test given. Don't forget that the midterm exam will be on Tuesday March 31, 1998.

CS 696 Final Exam, Spring 1997

1 True or False. When ever a pattern could be used in a design it should be used. Explain your answer.

2. Select a pattern other than the singleton and discuss it's liabilities. Your choices are: Abstract factory, Adapter, Bridge, Builder, Chain of Responsibility, Command, Composite, Facade, Factory Method, Flyweight, Interpreter, Iterator, Mediator, Memento, Observer, Prototype, Proxy, State, Strategy, Template Method or Visitor.

3. Select one of the following pairs of patterns: Mediator and Observer; Bridge and Adapter; State and Strategy. Discuss the conditions and situations when each pattern should be used over the other.

4. The following patterns were listed as solving tight coupling: Abstract Factory, Bridge, Chain of Responsibility, Command, Facade, Mediator, Observer. Select one of the patterns. Discuss how the pattern reduces coupling. The discussion should cover the coupling that would occur if the pattern was not used, the coupling that does occur when the pattern is used, and how the latter is less coupling than the former.

5. What are the two main design principles used in design patterns.

6. What is control coupling? Give an example. Give one way to reduce control coupling.

7. Explain one of the following types of cohesion: Logical, Temporal, Procedural, Communication, Sequential. (Coincidental and Functional are left off the list on purpose.) Give an example.

8. Beginning Java programmers often create an interface (or an abstract class) to hold constants. Then each class that uses one or more constants inherits the interface (abstract class). What type(s) of cohesion does (or could) such an interface (abstract class) exhibit?

9. What is a primitive method? Why are they considered desirable?

visitors since March 20, 1998