package cn.bunny.pattern5.demo1.command;

import cn.bunny.pattern5.demo1.AirConditioner;

// 具体命令类：关闭空调的命令
public class AirConditionerOffCommand implements Command {
    private final AirConditioner airConditioner;

    public AirConditionerOffCommand(AirConditioner airConditioner) {
        this.airConditioner = airConditioner;
    }

    @Override
    public void execute() {
        airConditioner.off();
    }
}