日期:2014-05-20 浏览次数:20753 次
public class TV extends Machine{
    private String brand;
    private int maxvolume;
    
    public TV() {
        
    }
    public void work(){
        System.out.println("Play audio and video meida");
    }
    public String toString(){
        return "The power is "+getPower()+"\n"+"The voltage is "+getVoltage()+"\n"+"The current is "+getCurrent()+"\n"+"The type is "+getType()+"\n"+"The brand is "+brand+"\n"+"The maximum volume is "+maxvolume;
    }
    public static void main(String[] args) {
        TV tv=new TV();
        System.out.println(tv);
        
    }
}