Presentation is loading. Please wait.

Presentation is loading. Please wait.

Composite Structure Diagram Luca Colombi. Abstract UML 2.0 composite structure diagram Basic concepts Structure, structured entity, internal structure.

Similar presentations

Presentation on theme: "Composite Structure Diagram Luca Colombi. Abstract UML 2.0 composite structure diagram Basic concepts Structure, structured entity, internal structure."— Presentation transcript:

1 Composite Structure Diagram Luca Colombi

2 Abstract UML 2.0 composite structure diagram Basic concepts Structure, structured entity, internal structure Elements Property Connector Nested notation Description power Classes & Structured Classes Instance specification Namespace behaviour Collaboration Purpose Roles Role binder Collaboration Occurrence Occurrence binder > & > Port Visibility Interfaces Examples

3 UML 2.0 diagram Classified in UML 2.0 structural diagrams New: this diagram was not available in UML 1.*

4 Purpose Composite structure diagrams can be used to describe: structures of interconnected parts run-time structures of interconnected instances Example: Description of the parts of an engine that are interconnected to perform the engine functioning

5 Structure A set of instances that communicate and collaborate at run-time to realize a common goal Ex.: net routers that realize a particular journey Structured element: An element realized by a structure Ex.: a net realized by routers Internal structure: A structure that realize a structured element Ex.: all the routers in a net

6 Property A set of instances contained in a structured instance roleName:TypeName ms:MailSender sendMail(…) MailSender role of the property instances for the container (optional) type or class of the property instances (obligatory)

7 Connector Represents the visibility between two property a communication way w:Well e:Engine connName:ConnType roleName1roleName2 [Multeplicity1][multeplicity2] a:Axis 2 1 role multeplicity (optional) role name (optional)connector name (optional) connector type (optional) proprerty

8 Nested notation Composite structure diagrams allows to use class diagram-like or nested notation It is permitted to recursively nest already nested entities Container contained3:Inner3 contained2:Inner2[n2] contained1:Inner1[n1] contained3:Inner3 contained2:Inner2 contained1:Inner1 property multeplicity (integer, optional) inner dash if not a composition

9 Structured Class: example Recursive application of nested notation can be done inside a single diagram RoomContents john:Man geranium:Plant Leaf[*] Trunk height:real

10 Description power Nested notation can describe all things describable in 1.* class diagrams notation, and a little more Car WheelEngine Car ** Axis w:Wheel[4]e:Engine a:Axis 21 e 12 w

11 Instance specification describes the property which is returned by an operation call, the operation is pointed by the arrow at the end of a dashed line that starts from the returned type description Room createChair(…) getWindow(…) c:Chair > is an optional label and specify that label exists only after the operation call w:Window Leg[4] >

12 Namespace behaviour A structured class acts as a namespace for its internal descriptions, so descriptions are not implicitly exported

13 Collaboration A joining of structure elements that collaborate to collectively perform a task CollaborationName Used in nested notation The name given to the collaboration (obligatory)

14 Collaboration purpose A collaboration wants to describe a structure behaviour made by structure property Must be connected only with property which are required to perform its described behaviour

15 Collaboration role property which collaborate to perform the collaboration goal, interpreting roles Each collaboration role perform a specific task Counting of clients ClientCard name:String address:String … “Counting of clients” have some ClientCard as roles

16 Collaboration Role Binder represent a participation of the role to the collaboration Pilot Car Drive a car roleName the name given to the role property collaboration

17 Collaboration Occurrence A specific collaboration instance occName:CollName used in nested notation occName:CollName name of the instance (obligatory) type of the instance (obligatory) send:MailSend

18 Occurrence binder Binds an occurrence to a role, maybe specifing how many occurrence repetitions are present occName:CollName RoleType roleName[n] occName:CollName roleName:RoleType [n] sellProduct:Sell john:Countryman Egg role name (optional) role multeplicity (optional) selled[12]

19 Example: occurrence - Send mail send:Send an email Sender Receiver mailServer[2] [1]

20 > label A dashed arrow between two symbol of same type means that pointing symbol represent pointed symbol, like in a specialization Send email > Communicate Home > Building > label is optional

21 > label client:CurrentAccount accredit(…) deposit:Increase amount > A dashed arrow from a collaboration or an occurrence to a property means that property use the other instance, like a client or a use case primary actor > label is optional

22 Occurrence binding nest crossing Occurrence binding is admitted between separately nested elements with also have occurrence bindings d:dealerp:producer products transportputting on shelf

23 Port represent a property communication point, and is always placed where the property joins whit its connector two types of communications: Between a property and its external environment Between a property and its internal structure

24 Ports: visibility marking If port symbol cover a rectangle boundary his visibility is public If port symbol is placed inside a rectangle, adjacent to his boundary, his visibility is protected portName:EntityName[n] port instance name (optional) port type (optional) port multeplicity (optional) Computer User m:Monitor[1] property

25 Ports: interfaces An interface exported by a port is a little circle (interface symbol) connected with the port symbol by a line An interface needed by a port is a little semicircle (socket symbol) connected with the port symbol by a line If interface is present, interface type is signed near interface symbol

26 Ports: interfaces examples Apache SqlSrv HttpSrvc sqlServer httpService [100] Apache SqlSrv sqlServer[1] httpService:HttpSrvc [100] Apache sqlServer:SqlSrv [1] httpService:HttpSrvc [100]

27 Example: Port Structure with many kinds of connectors and ports: StudentRoom :Key[101] Keyboard Student Computer p:RoomDoor w:Window Monitor

28 Example: structured class - House House Kitchen Bath Hall Passage Bedroom[2] [1] :Door:Window :Window[2] :Window[1] :Window

29 Example: collaboration - Drive a taxi Drive a taxy john:TaxyDriver kate:Passenger Body Head Leg[2]BustArm[2] [2] Car Well[4]Engine [2] GE_553912:Taxy :SteeringWheel [1] [0..5] place:Seat

30 References OMG official site for UML: Agile software association Composite structure diagrams:

Download ppt "Composite Structure Diagram Luca Colombi. Abstract UML 2.0 composite structure diagram Basic concepts Structure, structured entity, internal structure."

Similar presentations

Ads by Google