You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
723 B
26 lines
723 B
/**
|
|
* 智能家居控制中心类
|
|
* 可以根据设备的不同接口类型调用相应的功能
|
|
*/
|
|
public class SmartHomeControlCenter {
|
|
|
|
/**
|
|
* 控制可打印设备
|
|
* @param device 可打印设备
|
|
*/
|
|
public void controlPrintableDevice(Printable device) {
|
|
System.out.println("控制中心正在操作可打印设备...");
|
|
device.print();
|
|
}
|
|
|
|
/**
|
|
* 控制多功能一体机的所有功能
|
|
* @param machine 多功能一体机
|
|
*/
|
|
public void controlAllInOneMachine(AllInOneMachine machine) {
|
|
System.out.println("控制中心正在操作多功能一体机...");
|
|
machine.print();
|
|
machine.scan();
|
|
machine.copy();
|
|
}
|
|
} |