1.隱藏實現細節,使得代碼能夠模塊化;擴展代碼模塊,實現代碼重用
2.接口重用:在類的繼承和派生的時候,保證使用家族中任一類的實例的某一屬性時的正確調用。
{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"typ
{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragr
{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null