% Demonstrates class member visibility, including the protected marker "#".
%
% The diagram body is read verbatim, so write PlantUML exactly as in a .puml
% file -- including characters LaTeX treats specially, such as "#". Write them
% as-is; do NOT escape them (e.g. use "#balance", not "\#balance"). See #24.
%
% LaTeX/TikZ output (PlantUML's -tlatex). To measure text for TikZ, PlantUML
% auto-detects an installed LaTeX engine (lualatex, xelatex, or pdflatex), so no
% specific engine is required; see also the --png and --svg variants, which need
% no LaTeX engine at all.
\documentclass{scrartcl}
\usepackage[output=latex]{plantuml}
\begin{document}
\begin{plantuml}
class BankAccount {
  +owner : String
  #balance : double
  -pin : int
  ~auditTrail : List
  +deposit(amount : double)
  #applyInterest()
  -validatePin(pin : int)
}
\end{plantuml}
\end{document}
