SDSU CS 635: Advanced Object-Oriented Design & Programming
Spring Semester, 1998
Exam Review

To Lecture Notes Index
© 1998, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 21-Apr-98

Contents of Doc 17, Exam Review

Doc 17, Exam Review Slide # 2
Exam Date Tuesday March 31, 1998

What the Exam Covers

Documents 1 - 16 except:

Event Channel
Reactor Pattern

Doc 17, Exam Review Slide # 3
Assignment 1

1. Provide a complete set of primitive methods for the public interface of a table and a labeled table class.

2. Explain how to decouple a program from the type of container used. Give an example. Provide the details of your example.

3. Discuss the type of cohesion found in math libraries. Is there a way to improve the cohesion?

Doc 17, Exam Review Slide # 4
Assignment 2

1. A factory method and a template method can seem very similar. Explain the similarity between a factory method and a template method. Explain the difference between them.

2. The text introduces the idea of a parameterized factory method. Discuss the type of cohesion and coupling this introduces. Contrast this with the cohesion and coupling in the alternative to the parameterized factory method. When would you choose the parameterized factory method over its alternative?

3. How does using a factory method in a client object differ from a prototype or an abstract factory?

4. Explain the advantages of the prototype over a factory method. When would you use one over the other? Give an example.

Doc 17, Exam Review Slide # 5
Old Exams

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.

Doc 17, Exam Review Slide # 6

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 23-Mar-98