|
Object CompositionOperator Overloading Table Of Contents Exceptions
Class RelationshipsLarge programs and software libraries typically contain many classes. These classes can have various types of relationships. The three most common ones include: uses, has-a, and is-a. In a uses relationship, one class depends on another in order to carry out a particular operation. This dependency can exist between different classes are among the same class. With a has-a relationship, the objects of one class contains objects (as data fields) of one or more other classes. The Mutable ObjectsAny object that stores information is said to have a state. The object’s state is the current set of values that it contains. Objects are divided into two distinct categories: mutable and immutable.
If there are no methods defined for a class which alter the data fields, the class is said to be an immutable close. Otherwise, it is mutable. | |
© 2006 - 2008: Rance Necaise - Page last
modified on September 30, 2006, at 06:20 PM
|