// Power
package ch08_interface;
public interface Power {
public void on();
public void off();
}
--------------------------------------------------------------------------------
// Volume
package ch08_interface;
public interface Volume {
public void up();
public void down();
}
--------------------------------------------------------------------------------
//Player
package ch08_interface;
public class Player implements Power, Volume {
@Override
public void up() {System.out.println("- 소리 UP -");}
@Override
public void down() {System.out.println("- 소리 DOWN -");}
@Override
public void on() {System.out.println("- 전원 ON -");}
@Override
public void off() {System.out.println("- 전원 OFF -");}
}