zoukankan      html  css  js  c++  java
  • abstract factory 创建相互关联的类

    Function:
     Provide an interface for creating families of related or dependent objects without specifying their concrete classes.

    Participants:
  • AbstractFactory  (ContinentFactory)
    • declares an interface for operations that create abstract products
  • ConcreteFactory   (AfricaFactory, AmericaFactory)
    • implements the operations to create concrete product objects
  • AbstractProduct   (Herbivore, Carnivore)
    • declares an interface for a type of product object
  • Product  (Wildebeest, Lion, Bison, Wolf)
    • defines a product object to be created by the corresponding concrete factory
    • implements the AbstractProduct interface
  • Client  (AnimalWorld)
    • uses interfaces declared by AbstractFactory and AbstractProduct classes
查看全文
  • 相关阅读:
    css3实现背景图片颜色修改的多种方式
    KeyPress 和KeyDown 、KeUp之间的区别
    Web UI 自动化测试技术选型
    CSS3 动画性能优化
    prefetch_HTML5的页面资源预加载技术(Link prefetch)加速页面加载
    纯CSS3实现各种表情动画
    什么是css sprites(雪碧图),css sprites使用的优缺点
    Python爬虫连载7-cookie的保存与读取、SSL讲解
    Java连载82-Set、Collection、List、Map的UML演示
    HTML连载67-手风琴效果、2D转换模块
  • 原文地址:https://www.cnblogs.com/kevinge/p/1548243.html
  • Copyright © 2011-2022 走看看