当前位置:网站首页>【DesignMode】外观模式 (facade patterns)
【DesignMode】外观模式 (facade patterns)
2022-07-07 14:16:00 【weixin_43224306】
基本介绍
外观模式(Facade),也叫“过程模式:外观模式为子系统中的一组接口 提供一个一致的界面,此模式定义了一个高层接口,这个接口使得这一子系统更加容易使用
外观模式通过定义一个一致的接口,用 以屏蔽内部子系统的细节,使得 调用端只需跟这个接口发生调用,而无需关心这个子系统的内部细节
1. 影院管理项目
组建一个家庭影院:
DVD 播放器、投影仪、自动屏幕、环绕立体声、爆米花机,要求完成使用家庭影院的功能,其过程为:
直接用遥控器:统筹各设备开关
开爆米花机
放下屏幕
开投影仪
开音响
开 DVD,选 dvd
去拿爆米花
调暗灯光
播放
观影结束后,关闭各种设备
2. 传统方式解决影院管理
类图:

代码:
ClientTest{
public static 边栏推荐
- URL和URI的关系
- Statistical learning method -- perceptron
- laravel post提交数据时显示异常
- Logback logging framework third-party jar package is available for free
- PHP has its own filtering and escape functions
- Spark Tuning (III): persistence reduces secondary queries
- Common training data set formats for target tracking
- You Yuxi, coming!
- 121. 买卖股票的最佳时机
- PHP实现微信小程序人脸识别刷脸登录功能
猜你喜欢

Excessive dependence on subsidies, difficult collection of key customers, and how strong is the potential to reach the dream of "the first share of domestic databases"?

Three. JS series (1): API structure diagram-1

95. (cesium chapter) cesium dynamic monomer-3d building (building)

无法将“pip”项识别为 cmdlet、函数、脚本文件或可运行程序的名称

Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation

The unity vector rotates at a point

【Vulnhub靶场】THALES:1
![[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3](/img/8f/ca9ab042916f68de7994d9f2124da9.jpg)
[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
![Application example of infinite list [uigridview]](/img/11/3be1c63680e6de8f068e79690ecf12.jpg)
Application example of infinite list [uigridview]

Apache Doris just "graduated": why should we pay attention to this kind of SQL data warehouse?
随机推荐
[summary of knowledge] summary of notes on using SVN in PHP
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
Performance measure of classification model
[vulnhub range] thales:1
JS 模块化
1亿单身男女“在线相亲”,撑起130亿IPO
Regular expression string
Three. JS series (2): API structure diagram-2
Logback logging framework third-party jar package is available for free
Prometheus API deletes all data of a specified job
[excelexport], Excel to Lua, JSON, XML development tool
Xcode Revoke certificate
Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
SPI master RX time out interrupt
MySQL数据库基本操作-DQL-基本查询
Plate - forme de surveillance par étapes zabbix
47_ Contour lookup in opencv cv:: findcontours()
php 自带过滤和转义函数
thinkphp3.2.3中设置路由,优化url
Leetcode-136- number that appears only once (solve with XOR)