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

代码:
ClientTest{
public static 边栏推荐
- 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"?
- [hcsd celebrity live broadcast] teach the interview tips of big companies in person - brief notes
- [excelexport], Excel to Lua, JSON, XML development tool
- Dotween -- ease function
- JS中null NaN undefined这三个值有什么区别
- Power of leetcode-231-2
- Xcode Revoke certificate
- iptables只允许指定ip地址访问指定端口
- Pycharm terminal enables virtual environment
- JS 模块化
猜你喜欢

Odoo集成Plausible埋码监控平台

Vs tool word highlight with margin

Imitate the choice of enterprise wechat conference room

Prediction - Grey Prediction

Talk about the cloud deployment of local projects created by SAP IRPA studio
Notification uses full resolution

如何快速检查钢网开口面积比是否符合 IPC7525

MySQL数据库基本操作-DQL-基本查询

The team of East China Normal University proposed the systematic molecular implementation of convolutional neural network with DNA regulation circuit

分步式監控平臺zabbix
随机推荐
Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
[C language] question set of X
华东师大团队提出,具有DNA调控电路的卷积神经网络的系统分子实现
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
Mysql database basic operation DQL basic query
如何快速检查钢网开口面积比是否符合 IPC7525
You Yuxi, coming!
Sysom case analysis: where is the missing memory| Dragon lizard Technology
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
How to query the data of a certain day, a certain month, and a certain year in MySQL
无法将“pip”项识别为 cmdlet、函数、脚本文件或可运行程序的名称
Imitate the choice of enterprise wechat conference room
three.js打造酷炫下雪效果
Common training data set formats for target tracking
47_Opencv中的轮廓查找 cv::findContours()
JS modularization
How to implement backspace in shell
Step by step monitoring platform ZABBIX
Xcode Revoke certificate
"The" "PIP" "entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program."