<<< Factory Method     Index     Prototype Structure >>>

15. Prototype


  • Any subclass that needs a polymorphic constructor capability,

    1. Derives itself from the abstract base class

    2. Implements the clone( ) operation.

  • The client has two options under this design:

    • Call a factory method, providing prototypical instance as a parameter

    • Invoke some another action that calls the prototype's clone( ) operation.


<<< Factory Method     Index     Prototype Structure >>>