-
Notifications
You must be signed in to change notification settings - Fork 1
/
presentation.tex
794 lines (691 loc) · 20.3 KB
/
presentation.tex
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
\documentclass{beamer}
\hypersetup{colorlinks=true}
\graphicspath{{./images/}}
\usefonttheme{professionalfonts}
\usefonttheme{serif}
\usepackage{fontspec}
\setmainfont{Roboto Slab}
\usepackage{multicol}
\title{Superfast modeling in PlantUML}
\subtitle{Workshop PlantUML for creating UML diagrams}
\author{Sander van Geloven}
\institute{Hellebaard}
\date{May 11, 2019}
\keywords{PlantUML, UML, modeling, modelling, workshop}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\begin{figure}
\centering
\resizebox{!}{.8\textheight}{\includegraphics{images/1a35443.jpg}}
\end{figure}
\end{frame}
\section*{Outline}
\begin{frame}
\tableofcontents
\end{frame}
\begin{frame}{Introduction}
Sander van Geloven
\\\mbox{}
\begin{itemize}
\item information analyst / ICT architect
\\\mbox{}
\item self-employed at \href{http://hellebaard.nl}{hellebaard.nl}
\\\mbox{}
\item curriculum vitae at \href{https://linkedin.com/in/svgeloven}{linkedin.com/in/svgeloven}
\\\mbox{}
\item writing tools for spelling and grammar
\\\mbox{}
\begin{itemize}
\item Dutch spelling and grammar \href{http://opentaal.org}{opentaal.org}
\item Dutch word list \href{http://woordenlijst.org}{woordenlijst.org}
\item spell checker \href{https://nuspell.github.io}{nuspell.github.io}
\end{itemize}
\end{itemize}
\end{frame}
\section{Unified Modeling Language (UML)}
\begin{frame}{Unified Modeling Language (UML) — What is it?}
\begin{columns}
\begin{column}{.6\textwidth}
\begin{itemize}
\item \alert{modeling language for visualizing system design}
\\\mbox{}
\item designed in 1994 – 1996 by
\begin{itemize}
\item Grady Booch (1955)
\item Ivar Jacobson (1939)
\item James Rumbaugh (1947)
\end{itemize}
\mbox{}
\item \alert{diagrams to represent structural and behavior information}, including interaction aspects
\\\mbox{}
\item version 2.5.1, 5 December 2017, 800 pages, \href{http://uml.org}{uml.org}
\end{itemize}
\end{column}
\begin{column}{.4\textwidth}
\begin{figure}
\def\centering\svgwidth{\columnwidth}
\resizebox{\columnwidth}{!}{\input{images/logo-uml.pdf_tex}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{UML — No more flow charts on a back of a coaster}
\begin{figure}
\centering
\resizebox{!}{.75\textheight}{\includegraphics{images/coaster.jpg}}
\end{figure}
\end{frame}
\begin{frame}{UML — Common problems}
Common problems with visual editors for UML diagrams:
\\\mbox{}
\begin{enumerate}
\item wasting time positioning and repositioning elements
\\\mbox{}
\item wasting time untangling intersecting lines
\\\mbox{}
\item wasting time setting (partially working) grid snap
\\\mbox{}
\item wasting time applying font and font alignment
\\\mbox{}
\item wasting time and risking RSI while micro-aligning
\end{enumerate}
\end{frame}
\section{PlantUML}
\begin{frame}{PlantUML — What is it?}
\begin{columns}
\begin{column}{.6\textwidth}
\begin{itemize}
\item \alert{FOSS tool to create UML diagrams from plain text}
\\\mbox{}
\item developed 2009 – 2019 by Arnaud Roques
\\\mbox{}
\item GPLv3 but also LGPL, GPLv2, Apache License, Eclipse Public License and MIT License
\\\mbox{}
\item version 1.2019.5, 23 April 2019, \alert{17 types of diagrams}, \alert{12 output file formats}, \href{http://plantuml.com}{plantuml.com}
\end{itemize}
\end{column}
\begin{column}{.4\textwidth}
\begin{figure}
\def\centering\svgwidth{\columnwidth}
\resizebox{\columnwidth}{!}{\input{images/logo-plantuml.pdf_tex}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{PlantUML — How it works}
PlantUML:
\\\mbox{}
\begin{itemize}
\item uses the FOSS graph rendering \alert{Graphviz}, \href{https://graphviz.org}{graphviz.org}\\
for example \texttt{a -> b} creates\\
\begin{figure}
\centering
\resizebox{!}{.1\textheight}{\includegraphics{images/a.png}}
\end{figure}
\item has text file (\texttt{.puml} or \texttt{.pu}) as input
\\\mbox{}
\item generates diagram in output file or in a GUI
\\\mbox{}
\item uses \alert{convention over configuration}, yet is \alert{highly configurable}
\end{itemize}
\end{frame}
\begin{frame}{PlantUML — Supported UML diagrams}
UML behavior diagrams:
\begin{enumerate}
\item activity diagram
\item sequence diagram
\item timing diagram
\item state diagram
\item usecase diagram
\end{enumerate}
\mbox{}\\
UML structure diagrams:
\begin{enumerate}\setcounter{enumi}{5}
\item class diagram
\item deployment diagram
\item component diagram
\item object diagram
\end{enumerate}
\end{frame}
\begin{frame}{PlantUML — Supported non-UML diagrams}
Supported non-UML diagrams:
\begin{enumerate}
\item wireframe graphical interface
\item Archimate diagram
\item Specification and Description Language (SDL) diagram
\item Ditaa diagram
\item Gannt diagram
\item MindMap diagram
\item work breakdown structure diagram
\item mathematic with AsciiMath or JLaTeXMath notation
\end{enumerate}
\mbox{}\\
PlantUML is used by \alert{many} wikis, forums, text editors, IDE, programming languages and documentation generators.
\end{frame}
\begin{frame}{PlantUML — Supported output formats}
\begin{enumerate}
\item \texttt{gui} - Graphical User-Interface (your screen)
\item \texttt{png} - Portable Network Graphics (default)
\item \texttt{svg} - \alert{Scalable} Vector Graphics
\item \texttt{eps} - Encapsulated PostScript
\item \texttt{pdf} - Portable Document Format
\item \texttt{vdx} - Virtual Document eXchange
\item \texttt{xmi} - XML Metadata Interchange (class diagram)
\item \texttt{txt} - ASCII art
\item \texttt{utxt} - ASCII art using Unicode characters
\item \texttt{html} - Hypertext Markup Language (class diagram)
\item \texttt{scxml} - State Chart XML (state diagram)
\item \texttt{latex} - LaTeX/Tikz format
\item \texttt{latex:nopreamble} - LaTeX/Tikz format w/o preamble
\end{enumerate}
\end{frame}
\section{1~~~Usecase Diagram}
\begin{frame}[fragile]{1~~~Usecase Diagram — Simple example}
\begin{columns}
\begin{column}{.6\textwidth}
overview of \alert{users} in relation to functional requirements in \alert{usecases}
\begin{verbatim}
left to right direction
User <|-right- Admin : derives
User --> (Usecase 1)
Admin --> (Usecase 2)
(Usecase 3) .left.> (Usecase 1)
: extends
\end{verbatim}
Note that the arrow directions are rotated 90° clockwise.
\end{column}
\begin{column}{.4\textwidth}
\begin{figure}
\def\centering\svgwidth{\columnwidth}
\resizebox{!}{.5\textheight}{\input{images/usecase-diagram.pdf_tex}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{1~~~Usecase Diagram — Exercise}
\begin{columns}
\begin{column}{.35\textwidth}
Exercise 1/5:
\\\mbox{}\\
Make a minimal and optimized usecase diagram in PlantUML that describes the the roles of customers and staff eating and working at a restaurant.
\end{column}
\begin{column}{.65\textwidth}
\begin{figure}
\centering
\resizebox{!}{.75\textheight}{\includegraphics{images/dish.jpg}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{1~~~Usecase Diagram — Restaurant}
A customer \alert{may}:
\begin{itemize}
\item order
\item eat
\item pay
\end{itemize}
\mbox{}\\
Staff \alert{may}:
\begin{itemize}
\item serve
\item cook
\item charge
\end{itemize}
\mbox{}\\
All staff \alert{can also use} the restaurant in the \alert{role} of a customer.
\end{frame}
\begin{frame}[fragile]{1~~~Usecase Diagram — Restaurant}
\begin{verbatim}
left to right direction
Customer --> (order)
Customer --> (eat)
Customer --> (pay)
Staff --> (serve)
Staff --> (cook)
Staff --> (charge)
Customer <|-right- Staff
\end{verbatim}
\end{frame}
\begin{frame}{1~~~Usecase Diagram — Restaurant}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{!}{.7\textheight}{\input{images/usecase-diagram-minimal.pdf_tex}}
\end{figure}
\end{frame}
\begin{frame}[fragile]{1~~~Usecase Diagram — Restaurant}
\begin{verbatim}
skinparam TitleFontStyle Bold
skinparam ArrowColor Black
skinparam ActorBorderColor Black
skinparam UsecaseBorderColor Black
skinparam ActorBackgroundColor White
skinparam UsecaseBackgroundColor White
Title Usecase Diagram — Restaurant
left to right direction
Customer --> (order)
Customer --> (eat)
Customer --> (pay)
\end{verbatim}
\end{frame}
\begin{frame}{1~~~Usecase Diagram — Restaurant}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{.8\textwidth}{!}{\input{images/usecase-diagram-extended.pdf_tex}}
\end{figure}
\end{frame}
\section{2~~~Activity Diagram}
\begin{frame}[fragile]{2~~~Activity Diagram — Simple example}
\begin{columns}
\begin{column}{.5\textwidth}
\alert{activities} in \alert{sequence}, \alert{selection}, \alert{iteration} and \alert{parallel}
{\scriptsize\begin{verbatim}
start
:activity 1;
if (condition A?) then (yes)
:activity 2;
else (no)
:activity 3;
endif
while (condition B?) is (yes)
:activity 4;
endwhile (no)
fork
:activity 5;
fork again
:activity 6;
end fork
stop
\end{verbatim}}
\end{column}
\begin{column}{.5\textwidth}
\begin{figure}
\def\centering\svgwidth{\columnwidth}
\resizebox{!}{.65\textheight}{\input{images/activity-diagram.pdf_tex}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{2~~~Activity Diagram — Exercise}
\begin{columns}
\begin{column}{.35\textwidth}
Exercise 2/5:
\\\mbox{}\\
Make a minimal and optimized activity diagram in PlantUML of making a pot of tea when all items needed are withing reach.
\end{column}
\begin{column}{.65\textwidth}
\begin{figure}
\centering
\resizebox{!}{.75\textheight}{\includegraphics{images/teapot.jpg}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{2~~~Activity Diagram — Making tea}
Required \alert{activities}:
\begin{itemize}
\item choose teabag
\item put teabag in teapot
\item switch kettle on
\item fill kettle with water
\item kettle switches heater off
\item poor boiled water from kettle in teapot
\item kettle heats water
\end{itemize}
\mbox{}\\
Required \alert{conditions}:
\begin{itemize}
\item water in kettle is boiling?
\end{itemize}
\end{frame}
\begin{frame}[fragile]{2~~~Activity Diagram — Making tea}
\begin{verbatim}
start
:fill kettle with water;
:switch kettle on;
fork
while (water in kettle is boiling?) is (no)
:kettle heats water;
endwhile (yes)
:kettle switches heater off;
fork again
:choose teabag;
:put teabag in teapot;
end fork
:poor boiled water from kettle in teapot;
stop
\end{verbatim}
\end{frame}
\begin{frame}{2~~~Activity Diagram — Making tea}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{!}{.7\textheight}{\input{images/activity-diagram-minimal.pdf_tex}}
\end{figure}
\end{frame}
\begin{frame}[fragile]{2~~~Activity Diagram — Making tea}
\begin{verbatim}
skinparam TitleFontStyle Bold
skinparam ArrowColor Black
skinparam ActivityBorderColor Black
skinparam NoteBorderColor Black
skinparam ActivityBackgroundColor White
skinparam NoteBackgroundColor White
Title Activity Diagram — Making tea
start
:fill kettle with water;
floating note right: use tap water
:switch kettle on;
note right
<b>after</b> kettle
is placed back
end note
\end{verbatim}
\end{frame}
\begin{frame}{2~~~Activity Diagram — UML diagrams}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{!}{.5\textheight}{\input{images/activity-diagram-extended.pdf_tex}}
\end{figure}
\end{frame}
\section{3~~~State Diagram}
\begin{frame}[fragile]{3~~~State Diagram — Simple example}
\begin{columns}
\begin{column}{.5\textwidth}
behavioral \alert{state machine} with \alert{events} that trigger \alert{state} transitions
\begin{verbatim}
[*] -down-> StateA
StateA --> StateA : Event 1
StateA -down-> StateB : Event 2
StateB -up-> StateA : Event 3
StateB -down-> [*] : Event 4
\end{verbatim}
Note the \texttt{down} and \texttt{up} arrow directions and that the initial transition has no event.
\end{column}
\begin{column}{.5\textwidth}
\begin{figure}
\def\centering\svgwidth{\columnwidth}
\resizebox{!}{.8\textheight}{\input{images/state-diagram.pdf_tex}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{3~~~State Diagram — Exercise}
\begin{columns}
\begin{column}{.35\textwidth}
Exercise 3/5:
\\\mbox{}\\
Make a minimal and optimized state diagram in PlantUML that describes the states and events of a swimming pool locker under normal circumstances.
\end{column}
\begin{column}{.65\textwidth}
\begin{figure}
\centering
\resizebox{!}{.75\textheight}{\includegraphics{images/locker.jpg}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{3~~~State Diagram — Swimming pool locker}
Possible \alert{events}:
\\\mbox{}
\begin{itemize}
\item open or close door
\\\mbox{}\\
\item insert coin
\\\mbox{}\\
\item insert or retract key
\\\mbox{}\\
\item turn key clockwise or counterclockwise
\end{itemize}
\end{frame}
\begin{frame}{3~~~State Diagram — Swimming pool locker}
Possible aspects of \alert{states}:
\\\mbox{}
\begin{itemize}
\item door is open, closed or locked
\\\mbox{}\\
\item coin is inserted or not
\\\mbox{}\\
\item key is inserted, turned or retracted
\end{itemize}
\end{frame}
\begin{frame}[fragile]{3~~~State Diagram — Swimming pool locker}
\begin{verbatim}
[*] -right-> Open
Open -right-> OpenCoinIn : insertCoin
OpenCoinIn -down-> ClosedCoinIn : closeDoor
ClosedCoinIn -up-> OpenCoinIn : openDoor
ClosedCoinIn -down-> LockedKeyTurned : turnKeyCCW
LockedKeyTurned -left-> Locked : retractKey
Locked -right-> LockedKeyTurned : insertKey
LockedKeyTurned -left-> Closed : turnKeyCW
Closed -up-> Open : openDoor
Open -down-> Closed : closeDoor
\end{verbatim}
\end{frame}
\begin{frame}{3~~~State Diagram — Swimming pool locker}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{\textwidth}{!}{\input{images/state-diagram-minimal.pdf_tex}}
\end{figure}
\end{frame}
\begin{frame}[fragile]{3~~~State Diagram — Swimming pool locker}
\begin{verbatim}
skinparam TitleFontStyle Bold
skinparam ArrowColor Black
skinparam StateBorderColor Black
skinparam NoteBorderColor Black
skinparam StateBackgroundColor White
skinparam NoteBackgroundColor White
title State diagram — Swimming pool locker
Open -right-> OpenCoinIn : insert coin
state "Door Open" as Open
Open : • door is open
Open : • key is in
note bottom of Open : key cannot\nbe retracted
state "Door Open\nCoin Inserted" as OpenCoinIn
OpenCoinIn : • door is open\n• key is in\n• coin inserted
\end{verbatim}
\end{frame}
\begin{frame}{3~~~State Diagram — Swimming pool locker}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{\textwidth}{!}{\input{images/state-diagram-extended.pdf_tex}}
\end{figure}
\end{frame}
\section{4~~~Class Diagram}
\begin{frame}[fragile]{4~~~Class Diagram — Simple example}
\begin{columns}
\begin{column}{.65\textwidth}
structure of \alert{classes} with \alert{attributes} and \alert{methods} and object \alert{relations}
\begin{verbatim}
abstract class Vehicle
Vehicle : -string color
Vehicle : +getColor()
Vehicle "1" *-up- "0..*" Wheel : wheels
Vehicle <|-- Car
Car "0..1" o-- "0..*" Person
: passengers
\end{verbatim}
Note the \texttt{up} arrow direction and that attribute and method visibility.
\end{column}
\begin{column}{.35\textwidth}
\begin{figure}
\def\centering\svgwidth{\columnwidth}
\resizebox{!}{.8\textheight}{\input{images/class-diagram.pdf_tex}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{4~~~Class Diagram — Exercise}
Exercise 4/5:
\\\mbox{}\\
Make a minimal and optimized class diagram in PlantUML that describes the hierarchy of the following UML class diagrams:
\\\mbox{}
\begin{itemize}
\item state diagrams
\item object diagrams
\item activity diagrams
\item component diagrams
\item usecase diagrams
\item class diagrams
\end{itemize}
\end{frame}
\begin{frame}{4~~~Class Diagram — UML diagrams}
A usecase diagram \alert{is a} behavior diagram.
\\
An activity diagram \alert{is a} behavior diagram.
\\
A state diagram \alert{is a} behavior diagram.
\\\mbox{}\\
A class diagram \alert{is a} structure diagram.
\\
An object diagram \alert{is a} structure diagram.
\\
A component diagram \alert{is a} structure diagram.
\\\mbox{}\\
A behavior diagram \alert{is a} diagram.
\\
A structure diagram \alert{is a} diagram.
\\\mbox{}\\
All but leaf classes \alert{are} abstract.
\end{frame}
\begin{frame}[fragile]{4~~~Class Diagram — UML diagrams}
\begin{verbatim}
abstract class Diagram as Diagram
abstract class BehaviorDiagram
abstract class StructureDiagram
Diagram <|-- BehaviorDiagram
Diagram <|-- StructureDiagram
BehaviorDiagram <|-- UsecaseDiagram
BehaviorDiagram <|--- ActivityDiagram
BehaviorDiagram <|-- StateDiagram
StructureDiagram <|-- ClassDiagram
StructureDiagram <|--- ObjectDiagram
StructureDiagram <|-- ComponentDiagram
\end{verbatim}
\end{frame}
\begin{frame}{4~~~Class Diagram — UML diagrams}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{!}{.55\textheight}{\input{images/class-diagram-minimal.pdf_tex}}
\end{figure}
\end{frame}
\begin{frame}[fragile]{4~~~Class Diagram — UML diagrams}
\begin{verbatim}
skinparam TitleFontStyle Bold
skinparam ArrowColor Black
skinparam ClassBorderColor Black
skinparam ClassBackgroundColor White
hide empty members
title Class diagram — UML Diagrams
abstract class "Diagram" as diagram
abstract class "Structure\lDiagram" as structure
class "Class Diagram" as class
diagram <|-- structure
structure <|-right- class
\end{verbatim}
\end{frame}
\begin{frame}{4~~~Class Diagram — UML diagrams}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{\textwidth}{!}{\input{images/class-diagram-extended.pdf_tex}}
\end{figure}
\end{frame}
\section{5~~~Object Diagram}
\begin{frame}[fragile]{5~~~Object Diagram — Simple example}
\begin{columns}
\begin{column}{.6\textwidth}
overview of \alert{users} in relation to functional requirements in \alert{usecases}
\begin{verbatim}
object objectHouse
object objectParent
object objectChild
objectHouse o-- objectParent
objectParent *-- objectChild : child
objectHouse : levels = 2
objectParent : age = 36
objectChild : age = 8
\end{verbatim}
\end{column}
\begin{column}{.4\textwidth}
\begin{figure}
\def\centering\svgwidth{\columnwidth}
\resizebox{!}{.65\textheight}{\input{images/object-diagram.pdf_tex}}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}{5~~~Object Diagram — Exercise}
Exercise 5/5:
\\\mbox{}\\
Make a minimal and optimized object diagram of my red car that is composed of:
\\\mbox{}
\begin{itemize}
\item wheel left front
\\\mbox{}\\
\item wheel right front
\\\mbox{}\\
\item wheel left rear
\\\mbox{}\\
\item wheel right rear
\end{itemize}
\mbox{}\\
Create object according to the class diagram related vehicle discussed earlier.
\end{frame}
\begin{frame}[fragile]{5~~~Object Diagram — Car}
\begin{verbatim}
object myCar
myCar : color = Red
object wheelLeftFront
object wheelRightFront
object wheelLeftRear
object wheelRightRear
myCar *-- wheelLeftFront : wheels[0]
myCar *-- wheelRightFront : wheels[1]
myCar *-- wheelLeftRear : wheels[2]
myCar *-- wheelRightRear : wheels[3]
\end{verbatim}
\end{frame}
\begin{frame}{5~~~Object Diagram — Car}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{1.2\textwidth}{!}{\input{images/object-diagram-minimal.pdf_tex}}
\end{figure}
\end{frame}
\begin{frame}[fragile]{5~~~Object Diagram — Car}
\begin{verbatim}
skinparam TitleFontStyle Bold
skinparam ArrowColor Black
skinparam ObjectBorderColor Black
skinparam ObjectBackgroundColor White
title Object diagram — Car
object myCar {
color = Red
}
object wheelLeftFront
object wheelLeftRear
myCar *-left- wheelLeftFront : wheels[0]
myCar *-- wheelLeftRear : wheels[1]
\end{verbatim}
\end{frame}
\begin{frame}{5~~~Object Diagram — Car}
\begin{figure}
\def\centering\svgwidth{\textwidth}
\resizebox{\textwidth}{!}{\input{images/object-diagram-extended.pdf_tex}}
\end{figure}
\end{frame}
\begin{frame}{See also}
\href{https://github.com/PanderMusubi/plantuml-workshop}{github.com/PanderMusubi/plantuml-workshop}
\\\mbox{}\\
Some other of my FOSS projects:
\begin{itemize}
\item Dutch keyboard for Android\\\href{https://github.com/opentaal/LanguagePack/tree/Dutch}{github.com/opentaal/LanguagePack/tree/Dutch}
\item Dutch garbage collection ICS calendars\\\href{https://github.com/PanderMusubi/afvalophaaldata}{github.com/PanderMusubi/afvalophaaldata}
\item Dutch holiday ICS calendars\\\href{https://github.com/PanderMusubi/dutch-holidays}{github.com/PanderMusubi/dutch-holidays}
\item Compose Key Sequence Reference Guide\\\href{https://amazon.com/Compose-Sequence-Reference-Guide-2012/dp/1468141104}{amazon.com/Compose-Sequence-Reference-Guide-2012/dp/1468141104}
\item English locale for the Netherlands\\\href{https://github.com/PanderMusubi/locale-en-nl}{github.com/PanderMusubi/locale-en-nl}
\end{itemize}
\end{frame}
\end{document}