Build a class that exposes only what’s necessary.
One is to remain the flexibility of changing inside implementations at will. The other is the hidden portion usually can be easily corruptted, so by hiding them can reduce the program bugs.