重構:Replace Conditional with Polymorphism

You have a conditional that chooses different behavior depending on the type of an object. Move each leg of the conditional to an overriding method in a subclass. Make the original method abstract. 當有
相關文章
相關標籤/搜索