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
查看全文
  • 相关阅读:
    简单封装的ajax请求
    mysql-8.0 安装教程(自定义配置文件,密码方式已修改)
    计算机专业术语
    mvc路由
    Chosen三级联动
    Chosen通用初始化
    .NET Core学习之路
    Sql的一些常规判断
    CORS 跨域
    SQL 的一个技巧
  • 原文地址:https://www.cnblogs.com/kevinge/p/1548243.html
  • Copyright © 2011-2022 走看看