A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components...

16
A little bit of UML Csaba Veres

Transcript of A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components...

Page 1: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

A little bit of UML

Csaba Veres

Page 2: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

UML

A de facto standard for OO analysis and design

Many components class diagrams use cases interaction diagrams ...

Page 3: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Perspectives Conceptual model (analysis)

language independent often no direct mapping from concepts to

classes Specification (design)

interface, not implementation types rather than classes a type can have many implementations as classes

Implementation classes, methods, etc.

Page 4: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Associations a conceptual relationship between classes

an Order comes from a single Customer and one Customer can make several Orders

a specification of responsibility a Customer knows about its Orders

an implementation of pointers or some sort of reference class Customer {

private Vector _orders;

Page 5: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...
Page 6: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Detail

Concept model: multiplicity Implementation model:

navigability

Page 7: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Multiplicity (cardinality)

Page 8: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Navigability

Page 9: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

<<Stereotypes>> a high-level classification of the ”sort

of” object an object is controller interface

suggests certain general responsibilities can be used to extend basic UML

semantics can stereotype classes, relationships,

etc.

Page 10: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Multiple classification an object may be described by several

types not necessarily connected by inheritance i.e. multiple classification multiple

inheritance mi states that an object must have a single

type (with several supertypes) mc states that an object could be defined

as one of several types, depending on the purpose

Page 11: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...
Page 12: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Multiple classification (2)

Legal objects: (Female,Patient,Nurse) (Male,Physiotherapist) (Female,Doctor,Surgeon)

Illegal objects (Patient,Doctor) (Male,Doctor,Nurse)

Page 13: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Dynamic classification

Page 14: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

Aggregation and composition

Page 15: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

person

male

female

gender {}

Person

Male

Femalesex{complete}

Gender

type{complete}

must be male or female Gender

Page 16: A little bit of UML Csaba Veres. UML A de facto standard for OO analysis and design Many components class diagrams use cases interaction diagrams...

p e rs o n

g e n d e r

{}partition

Person Gender<<partition>>