handle the complexity

23
1 Handle the complexity Five mechanisms to understand and handle our complex world: classification generalization aggregation composition and power types.

Upload: ross

Post on 22-Jan-2016

33 views

Category:

Documents


0 download

DESCRIPTION

Handle the complexity. Five mechanisms to understand and handle our complex world: classification generalization aggregation composition and power types. Classification. When we classificate we apply a concept (in form of an object type) to object. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Handle the complexity

1

Handle the complexity

Five mechanisms to understand and handle our complex world:

• classification• generalization• aggregation• composition• and power types.

Page 2: Handle the complexity

2

Classification

Concepts

Term

Referent

”Nisse Hall” ”Anna Svan”

”Nisse Hall” ”Anna Svan”

”Student”

When we classificate we apply a concept (in form of an object type) to object.

It means that we only visualize the properties which are common to see similarities.

Without this concepts (object types) we would only know that things are different.

”Anna Svan””Nisse Hall””Student”

Page 3: Handle the complexity

3

Classification

Object typeObject?..*

0..*

Classify

is_an_instance_of

Anna Svan

Student

Woman

Nils Hall

Cecilia Björk

Zlatan

Page 4: Handle the complexity

4

Classification

Object type

Object

(?)..*

0..* classify

is_an_instance_of 1..*

0..*classify

is_an_instance_of

Object type and class are almost the same thing?

The reality Models

Class

Object

Page 5: Handle the complexity

5

Classification

Anna Svan Nisse Hall

Cecilia Björk

Zlatan

Student Man

Woman

Page 6: Handle the complexity

6

Classification

• The objects does not group themselves. The objects form groups thanks to the concepts (in form of object types) that we apply or place at the objects. It is people that group/classify.

• Note how children immediately see the difference between a dog and a cat. They seem to be able to understand the difference between the concept (the object type) dog and the concept (the object type) cat.

Page 7: Handle the complexity

7

Generalization

Concepts

Term

Referent

”Nisse Hall”

”Anna Svan”

”Nisse Hall”

”Anna Svan”

”Student”

”Cecilia Björk”

”Cecilia Björk” ”Person”

”Woman”

Generalization means that concepts, i.e object types that entirely includes or comprise other object types are distinguished

When we are generalizing we show if object types – not objects - have something in common.

”Anna Svan””Nisse Hall””Student””Person””Kvinna

Page 8: Handle the complexity

8

Generalization

Concepts”Nisse Hall”

”Anna Svan”

”Student”

”Cecilia Björk” ”Person”

”Woman”

Person

StudentWoman

The reality Models

Page 9: Handle the complexity

9

Generalization - notation

Anna Svan Nisse Hall

Cecilia BjörkZlatan

StudentWoman

Person

Person

Woman

Student

Page 10: Handle the complexity

10

Generalization set

Anna Svan

Cecilia Björk

StudentWoman

Person

Nils Hall

Zlatan

Man

Person

ManWoman

Student

Page 11: Handle the complexity

11

Generalization

Person

Nils Hall

Cecilia Björk

Anna Svan

Eva Strid

Zlatan

Man

Woman

Person

ManWoman

Page 12: Handle the complexity

12

Generalization – inheritance

Eva Strid

Anna Svan

Nils Hall

Cecilia Björk

Zlatan

Person

Person

Student

Student

personalnr

studentregnr

Superclass of Student

Subclass of Person

Page 13: Handle the complexity

13

More examples of generalization

Person

Student

personalnr

studentregnr

Teacher

emplyeenr

eva strid:Student

personalnr = ”770102-XXXX”studentregnr = ”66566366”

eva strid:Teacher

personalnr = ”770102-XXXX”employeenr = ”177745”

Eva Strid

Cecilia Björk

Nils Hall

Anna Svan

Arne Stolt

PersonStudent

Lärare

arne stolt:Teacher

personalnr = ”701113-XXXX”employeenr = ”177750”

Zlatan

Page 14: Handle the complexity

14

Classification och generalization

Generalization:

Object type

is_a_subclass_to

0..*

0..*

is_a_superclass_to

Classification:

Object typeObject1..*

0..*

classify

is_an_instance_of

Page 15: Handle the complexity

15

Classification or generalization?

2. A Border Collie is a dog.

3. Dogs are animals.

4. A Border Collie is a breed of dog.

5. Dog is a sort.

Test if following is a classification or a generalization!

1. Shep is a Border Collie.

Page 16: Handle the complexity

16

The reality and models – again

The reality Graphical models/diagram

Nils Hall

Cecilia Björk

Anna Svan

Eva Strid

Zlatan

Nils HallCecilia Björk

Anna Svan

Eva StridZlatan

Person

ManWoman

zlatan:Man

nilsHall:Man

annaSvan:Kvinna

ceciliaBjörk:Kvinna

evaStrid:Kvinna

Classification

Woman Man

Person

Generalization

Generalization

Classification

Page 17: Handle the complexity

17

Aggregation och composition

Rabbit

Ear Leg

2 4

1 1

Order

Order line

0..*

1

Aggregation Composition

Page 18: Handle the complexity

18

Composition

Object

is composed of

0..*

0..*

is part of

Composition:

Classification:

Object typeObject1..*

0..*

classify

is_an_instance_of

Generalization:

Object type

is_a_subclass_to

0..*

0..*

is_a_superclass_to

Page 19: Handle the complexity

19

Abstraction

Composition, aggregation, generalization and classification can be looked at as different types of abstraction.

Note that some authors think that only the classiffication is abstraction.

There are also authors who thinks that neither composition, aggregation, generalization nor classification are abstractions but to abstract is to start from the reality and to create models.

Page 20: Handle the complexity

20

Why Power Type?

Dog

name

weight

breed

average_weight

maw_strength (for german shepherds)

back_length (for dachshunds)

Page 21: Handle the complexity

21

Why Power Type?

Dogname

weight

breed

average_weight

German shepherd Dachshund

maw_strength back_length

Page 22: Handle the complexity

22

Why Power Type?

Dog

name

weight

German shepherd Dachshund

maw_strength back_length

Breed1..1

0..*

breed_nameaverage_weight

Page 23: Handle the complexity

23

Why Power Type?

Dog

name

weight

German shepherd Dachshund

maw_strength

back_length

Breed1..1

0..*

breed_name average_weight

Criteria

1..1

1..*

criterion_name

Dogshow

1..*

Show_nameresponsiblehall

0..*