java设计模式――装饰模式(Decorator)(二)
r.show();
}
}
public class DecoratorMain {
public static void main(String[] args)
{
Person daixu = new Person("待续");
System.out.println("第一种装饰");
Sneakers pqx = new Sneakers();
BigTrouser kk = new BigTrouser();
TShirts dtx = new TShirts();
pqx.Decorate(daixu);
kk.Decorate(pqx);
dtx.Decorate(kk);
dtx.show();
}
}