?復合 ?
Including pointers to objects as instance variables;(包含了一個對象實例變量的指針)
?構建一個類選擇使用 繼承 還是 復合?
Inheritance sets up an “is a” relationship. --> 什么就是(源自于)什么
Composition, on the other hand, sets up a “has a” relationship. --> 什么擁有(包含了)什么
簡而言之,復合 就是一個類中擁有另一個類的實例;