Object Diagram Notation Lecture Oo 11 Object Visibility

Object Diagram Notation Lecture Oo 11 Object Visibility

References n Booch, et al, The Unified Modeling Language User Guide, Chapt 18.

Teaching Points n n Object visibility Message Synchronization

Review n n Why/when would we use parameterized classes Parameterized classes vs. Generalization

Analysis/Design Method n Notation – The language for expressing each model n Process – The activities leading to the orderly construction of the system’s models n Tools – The artifacts that eliminate the tedium of modeling building and enforcing rules about the models themselves, so that errors and inconsistencies can be exposed

Object Interaction Diagrams n We will look at some additional concepts that can be expressed on object interaction diagrams

Object Visibility n n n It is often not apparent to when first studied that the design of object visibility is complex and fundamental The design of the web of object visibility's is critical to a project solution It is this web of visibility that provides the vehicle for the object communication which provides the solution to the problem

Object Visibility n n n Associated with the understanding of object visibility for a system, is object creation Initially only an object’s creator has visibility, any other object which needs access to this newly created object must get the visibility from the creator either directly or indirectly visibility can flow through object references or environment scope rules

Object Visibility n n The supplier object provides services through its interface The client object uses services of the supplier – this means the client initiates a message to the supplier – this means the client must have visibility to the supplier – the supplier need not have visibility to the client

Four Kinds of Visibility n Global – The supplier object is in a global scope to the client n Field – The supplier object is a part of the client

Four Kinds of Visibility n Parametric – The supplier object is a parameter to some operation of the client – The client gains visibility of the supplier through some exchange message with another object n Local – The supplier object is a locally declared object in the scope of the object diagram

Visibility Notation

Examples in Java

Message Synchronization Notation n n The message synchronization we have seen so far has represented simple sequential message passing In the presence of multiple threads of control we must specify other forms of synchronization

Message Synchronization Notation

Teaching Points n n Object visibility Message Synchronization
- Slides: 16