class Printer
{
private String brand;
public void Printer(String brand){
this.brand=brand;
}
public String getBrand(){
return brand;
}
public void print(String content){
}
}
class ColorPrinter extends Printer
{
public ColorPrinter(String brand){
super(brand); //交由父类的构造方法实现
}
public void print(String content){
System.out.println(getBrand()+"彩色打印"+content);
}
}
神不在的星期二