}
class Shengka implements PCI
{
public void powerOn(){}
public void swapData(){}
public void pluge()
{
System.out.println("声卡安装到了电脑上");
}
}
class Wangka implements PCI
{
public void powerOn(){}
public void swapData(){}
public void pluge()
{
System.out.println("网卡安装到了电脑上");
}
}
class ZhuBan
{
public void usePCI(PCI p)
{
p.Pluge();
}
}
public class MainBoard
{
public static void main(String[] args)
{
ZhuBan m=new ZhuBan();
PCI s=new Shengka();
PCI w=new Wangka();
m.usePCI(w);
m.usePCI(s);
}
}