public methods of a class are part of the
public services or the
public interface that the class provides to its clients.
• Methods and properties that modify the values of
private variables should verify that the intended new values are valid.
• A class’s methods and properties can throw exceptions to indicate invalid data.
• The actual data representation used within the class is of no concern to the class’s clients. This allows you to change the implementation of the class. Clients could use the same
public methods and properties to get the same results without being aware of this change.
• Clients are neither aware of, nor involved in, a class’s implementation. Clients generally care about ...