4. Example of constraints Circle radius:int {radius>0} Boss salary Employee salary 1 assistant {Salary:self.salary > assistant.salary} Article Warehouse Store {xor} (OCL) constraint named “Salary” xor constraint
16. Classifier-Notation and Semantics Notation Alternative Notation The standard notation for Classifier is a rectangle that contains the namen with the name of the subclass in guillemets above it
38. Example Attributes Customer Bookings -bookings Customer -bookings:Bookings[0..*] 0..* An attribute as either an association or an attribute notation Class Customer owns the property bookings in both cases
39.
40.
41.
42.
43.
44. Attribute – Order & Uniqueness {bag} No No Ordered list {sequence} Yes No Set (default) No Yes Ordered set {ordered} Yes Yes Collection Class isOrdered IsUnique
45. Ownership of properties Customer Booking -bookings 0..* -booker 1 Property bookings belongs to the Customer class (it is an attribute of Customer , navigation from Customer toward Booking ). But what about the property booker ? The class Booking knows nothing about this property (see navigational direction)
46. The object model for the UML metamodel c:Class name=“Customer” b:Class name=“Booking” p2:property name=“bookings” p1:property name=“booker” :Association ownedEnd memberEnd memberEnd ownedAttribute type type
62. Composition VS Aggregation Car Engine 1 0..1 Boat 1 has has 0..1 Car Engine 1 0..1 Boat 1 has has 0..1 The Engine object concurrently belongs to a Car object and a Boat object Here not !
63.
64.
65.
66.
67. Defining association directions: unidirectional and bidirectional relationships Invoice Address contains 1 Station Car contains 1 Insurance Contributor has 1
73. Notation variants for attributes and operations Class attribute1 attribute2 operation1() operation2() Class attribute1 attribute2 Class operation1() operation2() Class attribute1 attribute2 Class operation1() operation2()
86. Member notation-”contains” o “consists” Contract Tariffing Property Life The member notation is not limited to packages, it can be used to represent the hierarchical structure of other elements, such as classes residing in a package
87.
88. A package merge R A y:int C P A x:int B * aList <<merge>> The content of package P is merged into package R. Next we are going to review the formally defined rules to do this
89.
90.
91.
92. The merge result R(Merge-Result) P::A x:int B The content of package P is merged into package R. Next we are going to review the formally defined rules to do this P::B A y:int x:int{redefines x} * aList C {redefines aList}