具有一個 class 和 2 個子類但不使用 inheritance 的設計模式 [英]Design pattern with one class and 2 subclasses but without using inheritance