human
I am working on the file "DesignPattern/FacadePattern.ipynb".
The first task is:
但如果在多个业务场景中需要启动三个部件，怎么办？Ctrl+C加上Ctrl+V么？当然可以这样，但作为码农的基本修养之一，减少重复代码是应该会被很轻易想到的方法。这样，需要将其进行封装，在设计模式中，被封装成的新对象，叫做门面。门面构建如下
Can you write Python code for it?
assistant
#Here is the Python code you requested.

class EmergencyFacade(object):
    def __init__(self):
        self.alarm_sensor=AlarmSensor()
        self.water_sprinker=WaterSprinker()
        self.emergency_dialer=EmergencyDialer()
    def runAll(self):
        self.alarm_sensor.run()
        self.water_sprinker.run()
        self.emergency_dialer.run()

emergency_facade=EmergencyFacade()
emergency_facade.runAll()