PlantUML Flashcards

1
Q

how to start and end a class/sequence diagram

A

@start

@end

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A

A

with A A – B appears above

–>so it seems that LHS is above RHS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

–|> means….
and
..|> means…

A

we are using –|> to mean extends, i.e. subclass: A extends B (dotted line, closed arrow head)
vs
..|> means implements, i.e. interface (solid line, closed arrow head)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

*–

A

composite A *– B
–>B is an attribute of A
A “has-a” B as a field/attribute
*– : solid line, closed diamond

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

o–

A

aggregation A o– B
–>? not sure…maybe “is-a”, or dependent class?

o– : solid line, open diamond

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

package

A
package "Classic Collections" #DDDDDD {
  Object gives nice card-looking outline of anything in {}
#DDDDDD  light grey
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
class "This is a class" as class1 {blabla}
or
class class2 as "It works this way too" {blabla}
A

The diagram will have what is in quotes as the displayed text. The -as- classname can be used when giving the relationships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
class "This is a class" as class1 {blabla}
or
class class2 as "It works this way too" {blabla}
A

The diagram will have what is in quotes as the displayed text. The -as- classname can be used when giving the relationships
More useful for packages or components:
component “Book Genre” as genre {….}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

specific “spot”

A
spot is the term for the circulur icon --
class classname <> spotname (optional, appears in between <>)
1. class System << (S,#FF7700) Singleton >>
2. class Date << (D,orchid) >>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

scale 750 width

A

hm…can set the size of the diagram?

put at top, under @startuml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

packages style

A

makes the package appear graphically
example: package foo1 <> {}

<>  (a box)
<>
<>
<>
<>
<>

can also set all packages:
skinparam packagestyle <>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

default arrow orientation

A

By default, links between classes have two dashes – and are vertically oriented. It is possible to use horizontal link by putting a single dash (or dot) like this:
Room o- Student

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

title

A

appears at top

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

create styled relationship lines

A
@startuml
title Bracketed line style with label
class foo
class bar
bar1 : [bold]  
bar2 : [dashed]
bar3 : [dotted]
bar4 : [hidden]
bar5 : [plain] 
foo --> bar          : ∅
foo -[bold]-> bar1   : [bold]
foo -[dashed]-> bar2 : [dashed]
foo -[dotted]-> bar3 : [dotted]
foo -[hidden]-> bar4 : [hidden]
foo -[plain]-> bar5  : [plain]
@enduml
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

together

A

can be used alone or with package, component

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ortho lines

A

skinparam linetype ortho