CS 635 Object-Oriented Design & Programming |
---|
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.