summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgf-umlcd/demo/package.tex
blob: a3196d7dd36227a4ad52f8ac55305ff90f27b0eb (plain)
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
\begin{tikzpicture}
  \begin{package}{Accounts}
    \begin{class}[text width=5cm]{BankAccount}{0,0}
      \attribute{owner : String}
      \attribute{balance : Dollars = 0}

      \operation{deposit(amount : Dollars)}
      \operation[0]{withdrawl(amount : Dollars)}
    \end{class}

    \begin{class}[text width=7cm]{CheckingAccount}{-5,-5}
      \inherit{BankAccount}
      \attribute{insufficientFundsFee : Dollars}

      \operation{processCheck ( checkToProcess : Check )}
      \operation{withdrawal ( amount : Dollars )}
    \end{class}

    \begin{class}[text width=7cm]{SavingsAccount}{5,-5}
      \inherit{BankAccount}
      \attribute{annualInteresRate : Percentage}

      \operation{depositMonthlyInterest ( )}
      \operation{withdrawal ( amount : Dollars )}
    \end{class}
  \end{package}

\end{tikzpicture}