Logical View  «Prev  Next»
Lesson 12

Logical View and Object Model Conclusion

Class Diagram

The class diagram is the cornerstone of object-oriented analysis and design. All the other diagrams help to test and/or supplement the class diagram. The class diagram is the only diagram that generates code.

Associations

The class diagram includes classes organized in relation to one another using associations. Associations are defined using names, multiplicity, roles, and constraints. Classes that exist to describe an association are called association classes. An association between objects in the same class is called a reflexive association.

Aggregation and composition

Aggregation is used to describe classes of objects that are assembled to create a new object. Aggregation uses a diamond instead of an association name. The diamond is placed at the aggregate end of the association. When the life span of the parts depends on the life span of the aggregate, the association is termed composition instead of aggregation. An alternative notation for composition uses the context notation.

Generalization and delegation

Generalization is used to describe classes organized to share elements that together define a single object. Generalization is unlike all other associations. It does not use multiplicity, constraints, or roles. The icon for generalization is a triangle at the superclass end of the association. Delegation is a common technique for allowing one class to get help from another class without using inheritance.
Advice: Object modeling is an iterative process of discovery and refinement and do not try to get it right the first time. Use the other models to help you find more detail and discrepancies.

Glossary

This module introduced you to the following terms:
  1. Abstract operation: An operation in a class that makes logical sense for all subclasses, but that is not implemented in the class
  2. Aggregation: A class that represents the whole in a whole-part relationship
  3. Association:A relationship between classes that specifies the type of links that may be created between objects of the associated classes.
  4. Association class:Information about an association that has been abstracted into its own class.
  5. Attribute:A class member used to define a unit of information owned by the containing class, including such details as type and domain of values.
  6. Class:An abstraction of a set of related information, behaviors, and relationships that describes an entity. A definition used to create objects.
  7. Composition:Composition is depicted as a filled diamond and a solid line.
    Composition is a kind of association where the composite object has sole responsibility for the disposition of the component parts. The relationship between the composite and the component is a strong has a relationship, as the composite object takes ownership of the component. This means the composite is responsible for the creation and destruction of the component parts.
  8. Constraint: A constraint is a packageable element which represents some condition, restriction or assertion related to some element
  9. Context:The set of model elements that defines the frame of reference for the interpretation and implementation of a particular model element.
  10. Delegation:Passing responsibility for a task to another entity, typically hiding the implementation of the task from the requestor.
  11. Derived attribute: An attribute whose value can be determined by examining one or more other attribute values.
  12. Generalization:1. The process of factoring classes to define a hierarchy of shared elements organized into classes. 2. The class hierarchy that is the end result of the factoring process. 3. A type of association used to relate classes in a class hierarchy.
  13. Method:The implementation of an operation.
  14. Multiplicity:A constraint on the number of objects that may participate in one end of an association.
  15. Operation:The declaration of unit of behavior within a class.
  16. Private:A form of visibility constraint that prevents access to a model element from outside of the owning class.
  17. Protected:A protected variable, method, constructor, or inner class may be accessed in the package, class and subclasses of the class in which it is declared.
  18. Public:A public class or interface is accessible outside of its package. A public variable, method, constructor, or inner class is accessible anywhere that the class may be accessed.
  19. Reverse engineering: Reverse engineering is the process of discovering the technological principles of a device, object, or system through analysis of its structure, function, and operation.
  20. Role
  21. Subclass:
  22. Superclass: Any class that resides higher than the reference class in a generalization hierarchy.

Object Model - Quiz

In the next module, we explore the object diagram.
Click the Quiz link below to take a short, multiple-choice quiz about the material we've covered in this module.
Object Model - Quiz