SDSUCS 635 Object-Oriented Design & Programming
Spring Semester, 1998
CS 635: Assignment 2

To Assignment Index
San Diego State University -- This page last updated March 2, 1998

Due: Tuesday, March 17
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.

visitors since March 2, 1998