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 閱讀(125) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 叶城县| 浦北县| 汉源县| 新巴尔虎右旗| 铜梁县| 阜新市| 新化县| 吉隆县| 曲周县| 泗洪县| 蒙山县| 犍为县| 囊谦县| 延川县| 新和县| 麟游县| 荆州市| 扶余县| 睢宁县| 象山县| 尉犁县| 阿克陶县| 沙坪坝区| 若羌县| 明水县| 石柱| 平潭县| 香港 | 深泽县| 佳木斯市| 玉屏| 平度市| 拜城县| 土默特右旗| 宜君县| 大埔区| 西乌珠穆沁旗| 广水市| 大英县| 鄯善县| 大厂|