public class User {
public void saloon(){
System.out.println("客厅电源");
}
public void bedroom(){
System.out.println("卧室电源");
}
public void toilet(){
System.out.println("厕所电源");
}
}
public class Swiitch {
public void money(User user){
user.bedroom();
user.toilet();
user.saloon();
}
}
public class Test {
public static void main(String[] args) {
User user = new User();
Swiitch sw=new Swiitch();
sw.money(user);
}
}