Download presentation
Presentation is loading. Please wait.
1
Prototype Pattern 1
2
Definition Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype
3
Prototype p = prototype.Clone
Class Diagram Client Prototype prototype Operation() Clone() ConcretePrototype1 ConcretePrototype2 Prototype p = prototype.Clone Clone() Clone() // return copy of this // return copy of this
4
Participants Prototype ConcretePrototype Client
declares an interface for cloning itself ConcretePrototype implements an operation for cloning itself Client creates a new object by asking a prototype to clone itself
5
?
6
References Dofactory – “Prototype”
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.