39 lines
553 B
Plaintext
39 lines
553 B
Plaintext
# -*- mode: snippet -*-
|
|
# name: plantuml class and package diagram
|
|
# key: plantuml-package
|
|
# --
|
|
#+begin_src plantuml :file vending-domain-package.png
|
|
@startuml embedded-machine
|
|
skinparam {
|
|
handwritten true
|
|
monochrome true
|
|
}
|
|
|
|
package $0 {
|
|
together {
|
|
class $1 {
|
|
$2($3: $4)
|
|
}
|
|
class Display {
|
|
show_message(message: str)
|
|
}
|
|
}
|
|
class Drawer {
|
|
deliver()
|
|
}
|
|
class Button {
|
|
push()
|
|
}
|
|
class CashRegister {
|
|
insert(coins: int)
|
|
checkout(price: int)
|
|
}
|
|
Button -> Drawer
|
|
Drawer --> CashRegister
|
|
Drawer --> Bin
|
|
CashRegister --> Display
|
|
Bin --> Display
|
|
}
|
|
@enduml
|
|
#+end_src
|