posts - 37,comments - 7,trackbacks - 0
          A factory method handles object creation and encapsulates it in a subclass. This decouples the client code in the superclass from the object creation code in the subclass.
          1. A factory method is abstract so the subclasses are counted on to handle object creation.
          2. A factory method returns a Product that is typically used within methods defined in the superclass.
          3. A factory method isolates the client from knowing what kind of concrete Product is actually created.
          4. A factory method may be parameterized(or not) to select among several variations of a product.
          posted on 2005-08-11 16:02 Dave 閱讀(124) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 资中县| 蛟河市| 雷州市| 友谊县| 赤城县| 三台县| 安泽县| 卢氏县| 通江县| 墨江| 徐汇区| 宿州市| 田阳县| 洪雅县| 特克斯县| 呼图壁县| 华阴市| 日喀则市| 闽清县| 集安市| 互助| 高雄市| 康马县| 三台县| 灯塔市| 志丹县| 高邮市| 专栏| 宁都县| 镇巴县| 巴彦淖尔市| 黎平县| 广宗县| 安仁县| 花莲县| 庆元县| 宁乡县| 新疆| 青铜峡市| 瑞昌市| 江西省|