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
查看全文
  • 相关阅读:
    vue,如何每次访问同样路由都可以刷新
    CentOS 7.X 关闭SELinux
    Centos7安装Redis
    ubuntu 18.04 安装 MySql,并配置远程连接
    CentOS7设置阿里镜像源
    ubuntu 18.04 设置静态ip方法
    发现网络产品漏洞后,应立即通知上游开发者,并及时通知下游用户
    ApacheCN 数据库译文集 20211112 更新
    ApacheCN Linux 译文集(二) 20211206 更新
    ApacheCN C# 译文集 20211124 更新
  • 原文地址:https://www.cnblogs.com/kevinge/p/1548243.html
  • Copyright © 2011-2022 走看看