mirror of
https://github.com/huihut/interview.git
synced 2025-12-18 21:14:38 +03:00
Design mode code comments are changed to English
https://github.com/huihut/interview/pull/73
This commit is contained in:
@@ -6,20 +6,20 @@
|
||||
|
||||
void BridgeMain()
|
||||
{
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ơ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD>
|
||||
// Create electrical appliances (electric lights, electric fans)
|
||||
IElectricalEquipment * light = new Light();
|
||||
IElectricalEquipment * fan = new Fan();
|
||||
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD>ء<EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD>
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD>غ͵<EFBFBD><EFBFBD>ƹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>غͷ<EFBFBD><EFBFBD>ȹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// Create switch (pull chain switch, two-position switch)
|
||||
// Associating a pull chain switch with a light and a two-position switch with a fan
|
||||
ISwitch * pullChain = new PullChainSwitch(light);
|
||||
ISwitch * twoPosition = new TwoPositionSwitch(fan);
|
||||
|
||||
// <EFBFBD><EFBFBD><EFBFBD>ơ<EFBFBD><EFBFBD>ص<EFBFBD>
|
||||
// Lights on, lights off
|
||||
pullChain->On();
|
||||
pullChain->Off();
|
||||
|
||||
// <EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>رշ<EFBFBD><EFBFBD><EFBFBD>
|
||||
// Turn on the fan, turn off the fan
|
||||
twoPosition->On();
|
||||
twoPosition->Off();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user