OOPortal OOPortal


System Design  «Prev  Next»
Lesson 2The tools of object design
ObjectiveIdentify the work products used during object design.

Object Design Tools

Tools of object design

You have used most of the tools of object design already:
  1. Object model: For many people this phrase is synonymous with class diagram. However, the model in a larger sense also includes the object diagram and package diagram.
  2. Interaction diagram: A generic term referring to the two UML diagrams that model object interaction (communication), namely the sequence and collaboration diagrams.
  3. Activity diagram: The UML version of a flowchart with added features to model concurrent activities.
You will continue to use these same tools in object design. But now you will add different details to the diagrams. In addition, you will use the statechart (also called the state transition diagram) to model object life cycles and state-specific behaviors.
Review the relationships between the different diagrams in the MouseOver below.
The use case model identifies the communication between the actors and the system.
  1. The use case model identifies the communication between the actors and the system. The dialog is the basis for the interaction diagrams. The resources used to support the dialog become objects in the object model
  2. The use case descriptions may be modeled using activity diagrams that define the logic in the interaction between the actors and the system. Evaluation of the logic may result in changes to the scope and definition of the use cases.
  3. The activity diagram represents the logic for a use case or an individual operation.
  4. Whenever an operation requires significant logic, the activity diagram can be employed to help sort out the design of the operation. This in turn may result in the discovery of other smaller, reusable operations that may provide support for the larger more complex operations. Each operation also reveals the attributes that objects require in order to invoke an operation. These attributes are added to the class definitions for the objects whose purpose most closely matches the attribute purpose.
  5. The class diagram provides object definitions. Every operation and every attribute discovered by using the other diagrams are added to the class diagram. The class diagram is the definitive repository and the source for all code generation.
  6. The statechart diagram identifies actions and activities which translate into operations and operation logic. Each new operation is added to the class that defines the object.
  7. The statechart represents the life cycle of a single object. Every event that the object can respond to is represented along with the associated state changes and behaviors. State-specific behaviors are represented as actions and activities.
  8. The interaction diagrams may be used to derive the statechart diagram by identifying candidate states and the events that cause the transitions between the states.
  9. The interaction diagrams model the events passed between objects and in doing so identify the interfaces that the objects need in order to receive the events.
  10. Class definitions provide the objects that participate in the interaction diagrams. Interfaces discovered in the interaction diagrams translate into operations for the classes that define the participating objects. Each operation in turn identifies class attributes in the forms of input parameters (arguments) and return values.
  11. Individual scenarios in an activity diagram may form the basis for object communication in an interaction diagram. Interaction diagrams often identify complex interfaces that require further analysis using an activity diagram.

Design Work products
Interfaces discovered in the interaction diagrams translate into operations for the classes that define the participating objects. Each operation in turn identifies class attributes in the forms of input parameters (arguments) and return values.

Diagram interactions

In order to benefit from the diagrams, you need to understand the relationships between the diagrams. The diagrams:
  1. Present concise descriptions of what you know and decide about the system
  2. Represent different views of the system
Together, however, the various diagrams represent a complete picture of how the system is structured and how the objects work. By comparing the different views, you can identify inconsistencies and improve the overall model.
Note: Many CASE tools now provide consistency reports to compare the diagrams and highlight inconsistencies in the uses of specific model elements, such as events and objects. Others provide a scripting language that allows you to define your own reports.

Object Design Tools - Quiz

Click the Quiz link to review the tools of object design. Object Design Tools - Quiz