-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdiagram.puml
61 lines (47 loc) · 1.24 KB
/
diagram.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@startuml
namespace vistor {
class areaCalculator << (S,Aquamarine) >> {
- area int
- visitForSquare(s *square)
- visitForCircle(s *circle)
- visitForrectangle(s *rectangle)
}
class circle << (S,Aquamarine) >> {
- radius int
- accept(v visitor)
- getType() string
}
class middleCoordinates << (S,Aquamarine) >> {
- x int
- y int
- visitForSquare(s *square)
- visitForCircle(c *circle)
- visitForrectangle(t *rectangle)
}
class rectangle << (S,Aquamarine) >> {
- l int
- b int
- accept(v visitor)
- getType() string
}
interface shape {
- getType() string
- accept( visitor)
}
class square << (S,Aquamarine) >> {
- side int
- accept(v visitor)
- getType() string
}
interface visitor {
- visitForSquare( *square)
- visitForCircle( *circle)
- visitForrectangle( *rectangle)
}
}
"vistor.visitor" <|-- "vistor.areaCalculator"
"vistor.shape" <|-- "vistor.circle"
"vistor.visitor" <|-- "vistor.middleCoordinates"
"vistor.shape" <|-- "vistor.rectangle"
"vistor.shape" <|-- "vistor.square"
@enduml