implemented prototype pattern
This commit is contained in:
parent
322ab0d831
commit
0d876e949c
@ -12,6 +12,7 @@
|
|||||||
- [Builder](#builder)
|
- [Builder](#builder)
|
||||||
- [Factory](#factory)
|
- [Factory](#factory)
|
||||||
- [Abstract Factory](#abstract-factory)
|
- [Abstract Factory](#abstract-factory)
|
||||||
|
- [Prototype](#prototype)
|
||||||
- [Structural patterns](#structural-patterns)
|
- [Structural patterns](#structural-patterns)
|
||||||
- [Composition](#composition)
|
- [Composition](#composition)
|
||||||
- [Adapter](#adapter)
|
- [Adapter](#adapter)
|
||||||
@ -40,6 +41,9 @@ instantiate. Factory Method lets a class defer instantiation to subclasses.
|
|||||||
Provide an interface for creating famili es of related or dependent objects without
|
Provide an interface for creating famili es of related or dependent objects without
|
||||||
specifying their concrete classes.
|
specifying their concrete classes.
|
||||||
|
|
||||||
|
### Prototype
|
||||||
|
Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this protoype.
|
||||||
|
|
||||||
## Structural patterns
|
## Structural patterns
|
||||||
Structural patterns are concerned with how classes and objects are composed to form
|
Structural patterns are concerned with how classes and objects are composed to form
|
||||||
larger structures. Structural class patterns use inheritance to compose interfaces or implementations.
|
larger structures. Structural class patterns use inheritance to compose interfaces or implementations.
|
||||||
|
Reference in New Issue
Block a user