Presentation is loading. Please wait.

Presentation is loading. Please wait.

Detail Design Extending UML and Object Design. Object Design.

Similar presentations


Presentation on theme: "Detail Design Extending UML and Object Design. Object Design."— Presentation transcript:

1 Detail Design Extending UML and Object Design

2 Object Design

3 Extending UML

4

5

6 Constraints: Telemarketing Example

7 Constraints: Contact Management Example

8 OCL (Object Constraint Language) OCL is a formal language intended for specifying constraints Most OCL statements consist of the following structural elements – context -- defines a domain within which the expression is valid (e.g. an instance of a specific type or class, or a link) – a property of that instance which is the context for the expression -- e.g. attributes, association-ends – an OCL operation which is applied to the property -- arithmetic operators, set operators and type operators OCL statements can also include keywords – e.g. and, or, implies, if, then, else, not, in

9 Examples of OCL Expressions

10 Specifying OCL Constraints

11

12 Example OCL Operation Specification

13 Notes and Tags

14 Notes and Tags: Contact Management Example

15 Using Notes to Express OCL Constraints

16 Object-Oriented Detailed Design

17

18 Class Specification – Attributes and Operations

19 Class Specification Example

20 Attribute and Operation Visibility

21 Derived Information Derived information is information which is computed from other model elements – a kind of constraint that applies to an attribute or an association – derived information may make the model more readable Knowing which information is derived is more important in the design model – during design, access to information should be optimised -- actual data (derived information is stored after it has been derived) -- virtual data (derived information is dynamically recomputed each time) The UML notation for derived information is a solidus / in front of the name of the derived attribute or association

22 Derived Attribute Example

23 Summary Extending UML – additional modelling concepts ● stereotypes ● comments ● constraints – OCL (Object Constraint Language) References – Maciaszek, section 5.11, Bennett et al., section 10.5


Download ppt "Detail Design Extending UML and Object Design. Object Design."

Similar presentations


Ads by Google