在《The C++ Programming Language 2/e》中看到一段話:
We could implement this Stack in several ways. It is important that a user doesn't need to know how we do it. As long as we keep the interface unchanged, a user will not be affected if we decide to re-implement Stack.
若牽扯到維護層面,只要 class 的撰寫者不改變任何公開的介面(interface 只是個空殼,實體隨撰寫的考量而變,但功用需維持一致),使用者也就不用做任何變更。這也是 object-oriented programming 的分層維護,撰寫者只需針對自己的 code maintain。
以上只是 Data Abstraction 的一些要點,若進一步鑽研,可以請教向上學長 XD