官术网_书友最值得收藏!

UML class structure

The following UML diagram shows all the components of the Prototype design pattern:

UML diagram for Prototype design pattern

Let's see these components as listed in following points:

  • Prototype: The Prototype is an interface. It is uses the clone method to create instances of this interface type.
  • ConcretePrototype: This is a concrete class of the Prototype interface to implement an operation to clone itself.
  • Client: This is a caller class to create a new object of a Prototype interface by calling a clone method of the prototype interface.

Let's see a sample implementation of the prototype design pattern.

主站蜘蛛池模板: 老河口市| 红桥区| 林西县| 通化县| 湟源县| 徐闻县| 金门县| 临江市| 资中县| 云和县| 华池县| 招远市| 安宁市| 梅河口市| 离岛区| 金溪县| 宜川县| 鄂伦春自治旗| 安平县| 乳山市| 广河县| 出国| 招远市| 贵阳市| 潞城市| 灌南县| 修武县| 和平区| 邯郸县| 外汇| 启东市| 泗洪县| 鄂托克旗| 枣强县| 宁强县| 康马县| 聂荣县| 旬阳县| 宝兴县| 平陆县| 麻栗坡县|