//// Created by xiemenghui on 2018年7月21日.//#include "BridgeMain.h"void BridgeMain(){// Create electrical appliances (electric lights, electric fans)IElectricalEquipment * light = new Light();IElectricalEquipment * fan = new Fan();// Create switch (pull chain switch, two-position switch)// Associating a pull chain switch with a light and a two-position switch with a fanISwitch * pullChain = new PullChainSwitch(light);ISwitch * twoPosition = new TwoPositionSwitch(fan);// Lights on, lights offpullChain->On();pullChain->Off();// Turn on the fan, turn off the fantwoPosition->On();twoPosition->Off();SAFE_DELETE(twoPosition);SAFE_DELETE(pullChain);SAFE_DELETE(fan);SAFE_DELETE(light);}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。