Skip to content

Commit 4936982

Browse files
committed
week 4 improvement
1 parent 25d1fff commit 4936982

68 files changed

Lines changed: 2950 additions & 972 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
17.4 KB
Loading
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@startuml activity-notation
2+
skinparam backgroundColor transparent
3+
skinparam defaultFontSize 13
4+
skinparam shadowing false
5+
skinparam ActivityBorderColor #2e86c1
6+
skinparam ActivityBackgroundColor #eaf2f8
7+
skinparam ArrowColor #1a5276
8+
skinparam ActivityDiamondBackgroundColor #f9e79f
9+
skinparam ActivityDiamondBorderColor #f39c12
10+
11+
title Activity Diagram Notation
12+
13+
start
14+
15+
:Action 1;
16+
17+
if (Decision?) then (yes)
18+
:Action 2a;
19+
else (no)
20+
:Action 2b;
21+
endif
22+
23+
fork
24+
:Parallel\nAction 3a;
25+
fork again
26+
:Parallel\nAction 3b;
27+
end fork
28+
29+
:Final Action;
30+
31+
stop
32+
33+
@enduml
41.9 KB
Loading
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
@startuml association-aggregation-composition
2+
skinparam backgroundColor transparent
3+
skinparam defaultFontSize 14
4+
skinparam shadowing false
5+
skinparam ClassBorderColor #2e86c1
6+
skinparam ClassBackgroundColor #eaf2f8
7+
skinparam ClassFontColor #1a5276
8+
skinparam ClassHeaderBackgroundColor #2e86c1
9+
skinparam ClassHeaderFontColor white
10+
skinparam ArrowColor #1a5276
11+
skinparam NoteBorderColor #f39c12
12+
skinparam NoteBackgroundColor #fef9e7
13+
14+
title Association vs Aggregation vs Composition
15+
16+
package "Association" #f0f4f8 {
17+
class Teacher {
18+
- name: String
19+
+ teach()
20+
}
21+
class Student {
22+
- name: String
23+
+ study()
24+
}
25+
Teacher "1..*" -- "1..*" Student : teaches >
26+
}
27+
28+
package "Aggregation (has-a, weak)" #d5f5e3 {
29+
class Car {
30+
- model: String
31+
+ drive()
32+
}
33+
class Wheel {
34+
- type: String
35+
+ rotate()
36+
}
37+
Car "1" o-- "4" Wheel : has >
38+
note right of Wheel : Wheel can exist\nwithout Car
39+
}
40+
41+
package "Composition (part-of, strong)" #fadbd8 {
42+
class Person {
43+
- name: String
44+
+ live()
45+
}
46+
class Heart {
47+
+ beat()
48+
}
49+
class Brain {
50+
+ think()
51+
}
52+
Person "1" *-- "1" Heart : owns >
53+
Person "1" *-- "1" Brain : owns >
54+
note right of Heart : Heart cannot exist\nwithout Person
55+
}
56+
57+
@enduml
25 KB
Loading
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@startuml behavioral-diagrams-overview
2+
skinparam backgroundColor transparent
3+
skinparam defaultFontSize 13
4+
skinparam shadowing false
5+
skinparam rectangleBorderColor #2e86c1
6+
skinparam rectangleFontColor #1a5276
7+
skinparam packageBorderColor #1a5276
8+
9+
title Behavioral Diagrams
10+
11+
package "Behavioral Diagrams" as bd #eaf2f8 {
12+
rectangle "**State Machine**\nDiagram\nModels object states\n& transitions" as sm #d5f5e3
13+
14+
rectangle "**Activity**\nDiagram\nModels workflow\n& control flow" as act #d6eaf8
15+
16+
rectangle "**Use Case**\nDiagram\nModels user-system\ninteractions" as uc #fdebd0
17+
}
18+
19+
note bottom of bd
20+
Behavioral diagrams portray the
21+
**dynamic view** of a system
22+
end note
23+
24+
@enduml
21.9 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@startuml class-diagram-notation
2+
skinparam backgroundColor transparent
3+
skinparam defaultFontSize 14
4+
skinparam shadowing false
5+
skinparam ClassBorderColor #2e86c1
6+
skinparam ClassBackgroundColor #eaf2f8
7+
skinparam ClassHeaderBackgroundColor #2e86c1
8+
skinparam ClassHeaderFontColor white
9+
skinparam ArrowColor #1a5276
10+
11+
title Class Diagram: Three Sections
12+
13+
class "**ClassName**\n(Upper Section)" as cls {
14+
__Middle Section (Attributes)__
15+
- privateAttr: Type
16+
# protectedAttr: Type
17+
+ publicAttr: Type
18+
~ packageAttr: Type
19+
..
20+
__Lower Section (Methods)__
21+
+ publicMethod(): ReturnType
22+
- privateMethod(): void
23+
# protectedMethod(): Type
24+
}
25+
26+
note right of cls
27+
**Visibility:**
28+
+ public
29+
- private
30+
# protected
31+
~ package
32+
end note
33+
34+
@enduml
18.4 KB
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@startuml collaboration-notation
2+
skinparam backgroundColor transparent
3+
skinparam defaultFontSize 13
4+
skinparam shadowing false
5+
skinparam ObjectBorderColor #2e86c1
6+
skinparam ObjectBackgroundColor #eaf2f8
7+
skinparam ArrowColor #1a5276
8+
9+
title Collaboration Diagram Notation
10+
11+
object ":User" as user
12+
object ":LoginForm" as form
13+
object ":AuthService" as auth
14+
object ":Database" as db
15+
16+
user --> form : 1: enterCredentials()
17+
form --> auth : 2: validate()
18+
auth --> db : 3: checkUser()
19+
db --> auth : 4: result
20+
auth --> form : 5: authResult
21+
form --> user : 6: displayResult()
22+
23+
@enduml

0 commit comments

Comments
 (0)