This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/**
* 多功能一体机类
* 实现了Printable接口,具有打印功能
*/
public class AllInOneMachine implements Printable {
private String name;
* 构造函数
* @param name 多功能一体机名称
public AllInOneMachine(String name) {
this.name = name;
}
@Override
public void print() {
System.out.println(name + " 多功能一体机正在打印...");
* 扫描功能
public void scan() {
System.out.println(name + " 多功能一体机正在扫描...");
* 复印功能
public void copy() {
System.out.println(name + " 多功能一体机正在复印...");
* 获取多功能一体机名称
* @return 多功能一体机名称
public String getName() {
return name;