Detail of design and implementation are given for each. Source code is available on github.