@startuml
package com.iluwatar.composite {
  class App {
    - LOGGER : Logger {static}
    + App()
    + main(args : String[]) {static}
  }
  class Letter {
    - c : char
    + Letter(c : char)
    # printThisAfter()
    # printThisBefore()
  }
  abstract class LetterComposite {
    - children : List<LetterComposite>
    + LetterComposite()
    + add(letter : LetterComposite)
    + count() : int
    + print()
    # printThisAfter() {abstract}
    # printThisBefore() {abstract}
  }
  class Messenger {
    + Messenger()
    ~ messageFromElves() : LetterComposite
    ~ messageFromOrcs() : LetterComposite
  }
  class Sentence {
    + Sentence(words : List<Word>)
    # printThisAfter()
    # printThisBefore()
  }
  class Word {
    + Word(letters : List<Letter>)
    # printThisAfter()
    # printThisBefore()
  }
}
LetterComposite -->  "-children" LetterComposite
Letter --|> LetterComposite 
Sentence --|> LetterComposite 
Word --|> LetterComposite 
@enduml