handle the complexity
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 PresentationTRANSCRIPT
1
Handle the complexity
Five mechanisms to understand and handle our complex world:
• classification• generalization• aggregation• composition• and power types.
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”
3
Classification
Object typeObject?..*
0..*
Classify
is_an_instance_of
Anna Svan
Student
Woman
Nils Hall
Cecilia Björk
Zlatan
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
5
Classification
Anna Svan Nisse Hall
Cecilia Björk
Zlatan
Student Man
Woman
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.
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
8
Generalization
Concepts”Nisse Hall”
”Anna Svan”
”Student”
”Cecilia Björk” ”Person”
”Woman”
Person
StudentWoman
The reality Models
9
Generalization - notation
Anna Svan Nisse Hall
Cecilia BjörkZlatan
StudentWoman
Person
Person
Woman
Student
10
Generalization set
Anna Svan
Cecilia Björk
StudentWoman
Person
Nils Hall
Zlatan
Man
Person
ManWoman
Student
11
Generalization
Person
Nils Hall
Cecilia Björk
Anna Svan
Eva Strid
Zlatan
Man
Woman
Person
ManWoman
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
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
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
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.
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
17
Aggregation och composition
Rabbit
Ear Leg
2 4
1 1
Order
Order line
0..*
1
Aggregation Composition
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
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.
20
Why Power Type?
Dog
name
weight
breed
average_weight
maw_strength (for german shepherds)
back_length (for dachshunds)
21
Why Power Type?
Dogname
weight
breed
average_weight
German shepherd Dachshund
maw_strength back_length
22
Why Power Type?
Dog
name
weight
German shepherd Dachshund
maw_strength back_length
Breed1..1
0..*
breed_nameaverage_weight
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..*