如果存在多层继承,那么子类将越来越来庞大,在这种情况下可以考虑下用组合的方式进行.

尽量使用组合方法.

results matching ""

    No results matching ""